Commit e6fc07f1 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Fix the getopt stuff. Really need to call getopts, not getopt! Took me

30 minutes to notice that silly little s!
parent 9f791a7d
......@@ -54,12 +54,13 @@ sub usage {
my $packagedir = "";
my $batchmode = 0;
my %opts;
getopt("p:b",%opts);
if ($opt{p}) {
$packagedir = $opt{p};
if (! getopts("p:b", \%opts)) {
usage();
}
if (defined($opts{p})) {
$packagedir = $opts{p};
}
if ($opt{b}) {
if (defined($opts{b})) {
$batchmode = 1;
}
......@@ -153,6 +154,7 @@ if (! $batchmode) {
my $response = <>;
die "Installation aborted!\n" unless ($response =~ /^y/i);
}
exit(0);
if ($UID != 0) {
die "This script must be run as root.\n";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment