From 62a747b61612a08effdd95a0b6f3085fb8c3b335 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sat, 6 Jul 2002 23:22:25 +0000 Subject: Have --version --- pingd | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/pingd b/pingd index efc5c04..a9f8dad 100755 --- a/pingd +++ b/pingd @@ -1,7 +1,7 @@ #!/usr/bin/perl -wT # (c) 2002 Peter Palfrader -# $Id: pingd,v 1.19 2002/07/06 21:35:04 weasel Exp $ +# $Id: pingd,v 1.20 2002/07/06 23:22:25 weasel Exp $ # =pod @@ -140,6 +140,10 @@ Verbose mode. Causes B to print debugging messages about its progress. Print a short help and exit sucessfully. +=item --version + +Print version number and exit sucessfully. + =item --nohup Usefull only when passwd with the B, B, B, @@ -222,6 +226,9 @@ $ENV{'PATH'} = '/bin:/usr/bin'; delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'}; +my $VERSION = '2.0beta1'; + + my $redirected_stdio = 0; sub setSigHandlers() { @@ -441,6 +448,7 @@ my $params; Getopt::Long::config('bundling'); if (!GetOptions ( 'help' => \$params->{'help'}, + 'version' => \$params->{'version'}, 'verbose' => \$params->{'verbose'}, 'nohup' => \$params->{'nohup'}, 'detach' => \$params->{'detach'}, @@ -450,6 +458,14 @@ if (!GetOptions ( if ($params->{'help'}) { print ("Usage: $PROGRAM_NAME [options] command\n"); print ("See man pingd or perldoc pingd for more info.\n"); + print ("echolot $VERSION - (c) 2002 Peter Palfrader \n"); + print ("http://savannah.gnu.org/projects/echolot/\n"); + exit 0; +}; +if ($params->{'version'}) { + print ("echolot $VERSION\n"); + print ("(c) 2002 Peter Palfrader \n"); + print ("http://savannah.gnu.org/projects/echolot/\n"); exit 0; }; -- cgit v1.2.3