mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Better usage message. Ability to take args.
This commit is contained in:
parent
e2ceae0e2f
commit
0d257cc179
@ -28,17 +28,21 @@ use Cwd;
|
||||
|
||||
sub PrintUsage {
|
||||
die <<END_USAGE
|
||||
usage: startup-unix.pl <exe>
|
||||
usage: startup-unix.pl <exe> [<args>]
|
||||
e.g
|
||||
startup-unix.pl ../../../dist/bin/mozilla
|
||||
startup-unix.pl ../../../dist/bin/mozilla -P \"Default User\"
|
||||
END_USAGE
|
||||
}
|
||||
|
||||
{
|
||||
PrintUsage() if $#ARGV != 0;
|
||||
|
||||
PrintUsage() unless $#ARGV >= 0;
|
||||
# Build up command string.
|
||||
my $cwd = Cwd::getcwd();
|
||||
|
||||
my $cmd = join(' ', map {/\s/ ? qq("$_") : $_} @ARGV);
|
||||
my $time = Time::PossiblyHiRes::getTime();
|
||||
my $cmd = "@ARGV[0] \"file:$cwd/startup-test.html?begin=" . $time . "\"";
|
||||
$cmd .= qq( -url "file:$cwd/startup-test.html?begin=$time");
|
||||
print "cmd = $cmd\n";
|
||||
|
||||
# Run the command.
|
||||
|
Loading…
Reference in New Issue
Block a user