aboutsummaryrefslogtreecommitdiff
path: root/sboconfig
diff options
context:
space:
mode:
authorJ Pipkin <j@dawnrazor.net>2012-09-09 00:07:01 -0500
committerJ Pipkin <j@dawnrazor.net>2012-09-09 00:07:01 -0500
commit06c3247f55cf5ec1d1c8cd9b67a4852344a86eb6 (patch)
tree29685e8ffda1961d837684a2b9126e07833267e4 /sboconfig
parent50b40919437babf51d78944b912d559d353040e5 (diff)
downloadsbotools2-06c3247f55cf5ec1d1c8cd9b67a4852344a86eb6.tar.xz
fixed incorrect usage of hash in GetOptions
Diffstat (limited to 'sboconfig')
-rwxr-xr-xsboconfig23
1 files changed, 7 insertions, 16 deletions
diff --git a/sboconfig b/sboconfig
index 6e42305..d84b482 100755
--- a/sboconfig
+++ b/sboconfig
@@ -45,22 +45,13 @@ Config options (defaults shown):
EOF
}
-my ($help, $vers, $list);
-my %settings;
-
-GetOptions (
- 'help|h' => \$help,
- 'version|v' => \$vers,
- 'list|l' => \$list,
- \%settings => 'noclean|c=s',
- \%settings => 'distclean|d=s',
- \%settings => 'jobs|j=s',
- \%settings => 'pkg-dir|p=s',
- \%settings => 'sbo-home|s=s',
-);
+my %options;
+
+GetOptions (\%options, 'help|h', 'version|v', 'list|l', 'noclean|c=s',
+ 'distclean|d=s', 'jobs|j=s', 'pkg-dir|p=s', 'sbo-home|s=s');
-show_usage and exit 0 if $help;
-show_version and exit 0 if $vers;
+show_usage and exit 0 if exists $options{help};
+show_version and exit 0 if exists $options{version};
my %valid_confs = (
noclean => 'NOCLEAN',
@@ -78,7 +69,7 @@ if ($list) {
exit 0;
}
-show_usage and exit 0 unless %settings;
+show_usage and exit 0 unless keys %options > 0;
# setup what's being changed, sanity check.
my %changes;