Commit 7044f485 authored by Robert Ricci's avatar Robert Ricci

Add a -P option so that you can give a port name/version, overriding

the default one.
parent 8e23fa9e
......@@ -208,7 +208,7 @@ use Getopt::Std;
# Handle command-line options
#
sub usage {
print "Usage: ops-install [-p packagedir]\n";
print "Usage: boss-install [-p packagedir] [-P portname]\n";
exit(1);
}
......@@ -217,7 +217,7 @@ my $batchmode = 0;
my $password;
my %opts;
if (! getopts("p:bw:", \%opts)) {
if (! getopts("P:p:bw:", \%opts)) {
usage();
}
if (defined($opts{p})) {
......@@ -229,6 +229,9 @@ if (defined($opts{b})) {
if (defined($opts{w})) {
$password = $opts{w};
}
if (defined($opts{P})) {
$BOSS_PORT = $opts{P};
}
if (@ARGV) {
usage();
......
......@@ -52,14 +52,14 @@ use Getopt::Std;
# Handle command-line options
#
sub usage {
print "Usage: ops-install [-b] [-p packagedir]\n";
print "Usage: ops-install [-b] [-p packagedir] [-P portname]\n";
exit(1);
}
my $packagedir = "";
my $batchmode = 0;
my %opts;
if (! getopts("p:b", \%opts)) {
if (! getopts("P:p:b", \%opts)) {
usage();
}
if (defined($opts{p})) {
......@@ -68,6 +68,9 @@ if (defined($opts{p})) {
if (defined($opts{b})) {
$batchmode = 1;
}
if (defined($opts{P})) {
$OPS_PORT = $opts{P};
}
if (@ARGV) {
usage();
......
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