Added -h/--help and moved the argument iterator.
This commit is contained in:
1 parent
c7758c10ad
commit
13d6add750
1 file changed
+18
-13
@@ -48,6 +48,24 @@ sub modfind
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Iterate through the arguments passed to us.
|
||||||
|
my $features = "base";
|
||||||
|
if (defined $ARGV[0]) {
|
||||||
|
foreach (@ARGV) {
|
||||||
|
if ($_ eq "-h" or $_ eq "--help") {
|
||||||
|
println "*** ./install help ***";
|
||||||
|
println " --enable-sasl - Enable support for SASL.";
|
||||||
|
println "*** End of Help ***";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
elsif ($_ eq "--enable-sasl") {
|
||||||
|
$features .= " sasl";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
println "Warning: Unknown option '".$_."'";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Check operating system.
|
# Check operating system.
|
||||||
print "Checking operating system..... $OSNAME - ";
|
print "Checking operating system..... $OSNAME - ";
|
||||||
@@ -79,19 +97,6 @@ else {
|
|||||||
print "Unknown operating system. Contact support.\r\n";
|
print "Unknown operating system. Contact support.\r\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
# Iterate through the arguments passed to us.
|
|
||||||
my $features = "base";
|
|
||||||
if (defined $ARGV[0]) {
|
|
||||||
foreach (@ARGV) {
|
|
||||||
if ($_ eq "--enable-sasl") {
|
|
||||||
$features .= " sasl";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
println "Warning: Unknown option '".$_."'";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Check Perl version.
|
# Check Perl version.
|
||||||
my %VER = ver();
|
my %VER = ver();
|
||||||
print "Checking Perl version..... $VER{ver}.$VER{sub}.$VER{rev} - ";
|
print "Checking Perl version..... $VER{ver}.$VER{sub}.$VER{rev} - ";
|
||||||
|
|||||||
Reference in new issue
Block a user