aboutsummaryrefslogtreecommitdiff
path: root/sbosnap
diff options
context:
space:
mode:
authorAndreas Guldstrand <andreas.guldstrand@gmail.com>2015-11-14 03:03:55 +0100
committerAndreas Guldstrand <andreas.guldstrand@gmail.com>2015-11-14 03:03:55 +0100
commiteaa18fd91c51c136ff6ec607d46d32b87a2ea34f (patch)
treeb5d5cf8fe7b7adf75694f205ab9ca7dfded501d3 /sbosnap
parent38623091f241bd53975cf685136bab57f78c255e (diff)
downloadsbotools2-eaa18fd91c51c136ff6ec607d46d32b87a2ea34f.tar.xz
Remove prototypes and make sure subs are called with ()
Diffstat (limited to 'sbosnap')
-rwxr-xr-xsbosnap14
1 files changed, 7 insertions, 7 deletions
diff --git a/sbosnap b/sbosnap
index 455c472..cdf8c86 100755
--- a/sbosnap
+++ b/sbosnap
@@ -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;