From ff64e5a3f3384720e1ef3b054983d6520100e4cf Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 3 Apr 2006 13:58:26 +0000 Subject: add a usage message --- mdkonline | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'mdkonline') diff --git a/mdkonline b/mdkonline index ff4a8291..2e5581d0 100755 --- a/mdkonline +++ b/mdkonline @@ -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; -- cgit v1.2.1