diff options
-rwxr-xr-x | sbocheck | 28 |
1 files changed, 23 insertions, 5 deletions
@@ -13,15 +13,33 @@ use 5.16.0; use strict; use warnings FATAL => 'all'; use SBO::Lib; -use Getopt::Std; +use Getopt::Long; use Text::Tabulate; +use File::Basename; -my %options; -getopts ('v',\%options); +my $self = basename ($0); -show_version && exit 0 if exists $options{v}; +sub show_usage () { + print <<EOF +Usage: $self -update_tree; +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; # retrieve and format list of available updates sub get_update_list () { |