aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsbocheck22
1 files changed, 20 insertions, 2 deletions
diff --git a/sbocheck b/sbocheck
index d4607a8..0ef4743 100755
--- a/sbocheck
+++ b/sbocheck
@@ -15,10 +15,28 @@ use warnings FATAL => 'all';
use SBO::Lib;
use Getopt::Long qw(:config);
use Text::Tabulate;
+use File::Basename;
-my $vers;
-GetOptions ('version|v' => \$vers);
+my $self = basename ($0);
+sub show_usage () {
+ print <<EOF
+Usage: $self
+
+Options:
+ -h|--help:
+ this screen.
+ -v|--version:
+ version information.
+
+EOF
+}
+
+my ($help, $vers);
+
+GetOptions ('help|h' => \$help, 'version|v' => \$vers);
+
+show_usage && exit 0 if $help;
show_version && exit 0 if $vers;
update_tree;