diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2006-04-03 13:58:26 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2006-04-03 13:58:26 +0000 |
commit | ff64e5a3f3384720e1ef3b054983d6520100e4cf (patch) | |
tree | c914fc4c6c5b91b10302191be1444d688c1e410e | |
parent | 5e346ffb67f77309898bacabeeba9a3d51516549 (diff) | |
download | mgaonline-ff64e5a3f3384720e1ef3b054983d6520100e4cf.tar mgaonline-ff64e5a3f3384720e1ef3b054983d6520100e4cf.tar.gz mgaonline-ff64e5a3f3384720e1ef3b054983d6520100e4cf.tar.bz2 mgaonline-ff64e5a3f3384720e1ef3b054983d6520100e4cf.tar.xz mgaonline-ff64e5a3f3384720e1ef3b054983d6520100e4cf.zip |
add a usage message
-rwxr-xr-x | mdkonline | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -49,7 +49,27 @@ my @info; $ia = 1; -GetOptions('interactive!' => \$ia, 'login=s' => \$login, 'pass=s' => \$password, 'box=s' => \$boxname, 'country:s' => \$country); + +sub usage() { + print STDERR N("mdonline version %s +Copyright (C) %s Mandriva. +This is free software and may be redistributed under the terms of the GNU GPL. + +usage: +", 1, 2006) . N(" --help - print this help message. +") . N(" --box= - hostname. +") . N(" --country - name of country of the user. +") . N(" --interactive - use the interactive mode. +") . N(" --nointeractive - use the non-interactive mode. +") . N(" --login= - login name of the user. +") . N(" --pass= - password of the user. +"); + exit(0); +} + +GetOptions('interactive!' => \$ia, 'login=s' => \$login, 'pass=s' => \$password, 'box=s' => \$boxname, 'country:s' => \$country, + 'help' => \&usage, + ); my $in = interactive->vnew('su') if $ia; |