diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2015-11-14 03:03:55 +0100 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2015-11-14 03:03:55 +0100 |
commit | eaa18fd91c51c136ff6ec607d46d32b87a2ea34f (patch) | |
tree | b5d5cf8fe7b7adf75694f205ab9ca7dfded501d3 /sbosnap | |
parent | 38623091f241bd53975cf685136bab57f78c255e (diff) | |
download | sbotools2-eaa18fd91c51c136ff6ec607d46d32b87a2ea34f.tar.xz |
Remove prototypes and make sure subs are called with ()
Diffstat (limited to 'sbosnap')
-rwxr-xr-x | sbosnap | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -19,7 +19,7 @@ use Getopt::Long; my $sbo_home = $config{SBO_HOME}; my $self = basename($0); -sub show_usage() { +sub show_usage { print <<EOF Usage: $self [options|command] @@ -37,24 +37,24 @@ Commands: EOF } -show_usage and exit 1 unless exists $ARGV[0]; +show_usage() and exit 1 unless exists $ARGV[0]; my ($help, $vers); GetOptions('help|h' => \$help, 'version|v' => \$vers); -show_usage and exit 0 if $help; -show_version and exit 0 if $vers; +show_usage() and exit 0 if $help; +show_version() and exit 0 if $vers; # 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; } -if ($command eq 'fetch') { fetch_tree } -elsif ($command eq 'update') { update_tree } +if ($command eq 'fetch') { fetch_tree() } +elsif ($command eq 'update') { update_tree() } exit 0; |