diff options
author | Jacob Pipkin <j@dawnrazor.net> | 2012-08-30 07:20:32 -0500 |
---|---|---|
committer | Jacob Pipkin <j@dawnrazor.net> | 2012-08-30 07:20:32 -0500 |
commit | 38488004c207508834543e02e991e6129669bc8c (patch) | |
tree | 6191765663783a078fc84aa262ed05cc439071df /sbosnap | |
parent | cd16a547b321e8a10716868c7788d016531511d8 (diff) | |
download | sbotools2-38488004c207508834543e02e991e6129669bc8c.tar.xz |
changes for REQUIRES in SBos for 14, and many cleanups, fixes, enhancements
Diffstat (limited to 'sbosnap')
-rwxr-xr-x | sbosnap | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -12,10 +12,10 @@ # changelog: # .01: initial creation. +use 5.16.0; use SBO::Lib; use File::Basename; use Getopt::Std; -use feature switch; use warnings FATAL => 'all'; use strict; @@ -23,7 +23,7 @@ my %config = %SBO::Lib::config; my $sbo_home = $config{SBO_HOME}; my $self = basename ($0); -sub show_usage { +sub show_usage () { print <<EOF Usage: $self [options|command] @@ -39,25 +39,25 @@ Commands: EOF } -show_usage () and exit (1) unless exists $ARGV[0]; +show_usage and exit 1 unless exists $ARGV[0]; my %options; getopts ('hv', \%options); -show_usage () and exit (0) if exists $options{h}; -show_version () and exit (0) if exists $options{v}; +show_usage and exit 0 if exists $options{h}; +show_version and exit 0 if exists $options{v}; # check for a command and, if found, execute it my $command; if ($ARGV[0] =~ /fetch|update/) { $command = $ARGV[0]; } else { - show_usage () and exit 1; + show_usage and exit 1; } given ($command) { - when ('fetch') { fetch_tree () } - when ('update') { update_tree () } + when ('fetch') {fetch_tree} + when ('update') {update_tree} } exit 0; |