aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ Pipkin <j@dawnrazor.net>2012-09-08 14:31:40 -0500
committerJ Pipkin <j@dawnrazor.net>2012-09-08 14:31:40 -0500
commit788ae188dc9c8f8de4a20e1fdcc401f5b15b0890 (patch)
tree16f4eac8c8bef0b5765ee4197aaa99915e19d94c
parent3bc0af3c6cc7cac45765b981495ee5903f58d7dd (diff)
downloadsbotools2-788ae188dc9c8f8de4a20e1fdcc401f5b15b0890.tar.xz
sbosnap converted to Getopt::Long
-rwxr-xr-xsbosnap11
1 files changed, 6 insertions, 5 deletions
diff --git a/sbosnap b/sbosnap
index b3e0dff..df380cf 100755
--- a/sbosnap
+++ b/sbosnap
@@ -15,7 +15,7 @@ use strict;
use warnings FATAL => 'all';
use SBO::Lib;
use File::Basename;
-use Getopt::Std;
+use Getopt::Long;
my $sbo_home = $config{SBO_HOME};
my $self = basename ($0);
@@ -38,11 +38,12 @@ EOF
show_usage and exit 1 unless exists $ARGV[0];
-my %options;
-getopts ('hv', \%options);
+my ($help, $vers);
-show_usage and exit 0 if exists $options{h};
-show_version and exit 0 if exists $options{v};
+GetOptions ('help|h' => \$help, 'version|v' => \$version);
+
+show_usage and exit 0 if $help;
+show_version and exit 0 if $version;
# check for a command and, if found, execute it
my $command;