зеркало из https://github.com/mozilla/pjs.git
Add option to set display from command-line.
This commit is contained in:
Родитель
65fcaac93e
Коммит
8707054cd0
|
@ -11,7 +11,7 @@ use POSIX qw(sys_wait_h strftime);
|
|||
use Cwd;
|
||||
use File::Basename; # for basename();
|
||||
|
||||
$::Version = '$Revision: 1.64 $ ';
|
||||
$::Version = '$Revision: 1.65 $ ';
|
||||
|
||||
sub PrintUsage {
|
||||
die <<END_USAGE
|
||||
|
@ -20,6 +20,7 @@ Options:
|
|||
--depend Build depend (must have this option or clobber).
|
||||
--clobber Build clobber.
|
||||
--example-config Print an example 'tinder-config.pl'.
|
||||
--display DISPLAY Set DISPLAY for tests.
|
||||
--once Do not loop.
|
||||
--noreport Do not report status to tinderbox server.
|
||||
--nofinalreport Do not report final status, only start status.
|
||||
|
@ -89,22 +90,27 @@ sub ParseArgs {
|
|||
$Settings::BuildOnce = 1, next if $arg eq '--once';
|
||||
$Settings::UseTimeStamp = 0, next if $arg eq '--notimestamp';
|
||||
|
||||
if ($arg eq '--display') {
|
||||
my $arg_arg = shift @ARGV;
|
||||
PrintUsage() if $arg_arg eq '' or $arg_arg =~ /^-/;
|
||||
$Settings::DisplayServer = $arg_arg;
|
||||
}
|
||||
if ($arg eq '-tag') {
|
||||
$Settings::BuildTag = shift @ARGV;
|
||||
PrintUsage() if $Settings::BuildTag eq ''
|
||||
or $Settings::BuildTag =~ /^-/;
|
||||
my $arg_arg = shift @ARGV;
|
||||
PrintUsage() if $arg_arg eq '' or $arg_arg =~ /^-/;
|
||||
$Settings::BuildTag = $arg_arg;
|
||||
}
|
||||
elsif ($arg eq '-t') {
|
||||
$Settings::BuildTree = shift @ARGV;
|
||||
PrintUsage() if $Settings::BuildTree eq ''
|
||||
or $Settings::BuildTree =~ /^-/;
|
||||
my $arg_arg = shift @ARGV;
|
||||
PrintUsage() if $arg_arg eq '' or $arg_arg =~ /^-/;
|
||||
$Settings::BuildTree = $arg_arg;
|
||||
}
|
||||
elsif ($arg eq '--mozconfig' or $arg eq '--configfile') {
|
||||
# File generated by the build configurator,
|
||||
# http://cvs-mirror.mozilla.org/webtools/build/config.cgi
|
||||
$Settings::MozConfigFileName = shift @ARGV;
|
||||
PrintUsage() if $Settings::MozConfigFileName eq ''
|
||||
or $Settings::MozConfigFileName =~ /^-/;
|
||||
my $arg_arg = shift @ARGV;
|
||||
PrintUsage() if $arg_arg eq '' or $arg_arg =~ /^-/;
|
||||
$Settings::MozConfigFileName = $arg_arg;
|
||||
}
|
||||
elsif ($arg eq '--version' or $arg eq '-v') {
|
||||
die "$0: version" . substr($::Version,9,6) . "\n";
|
||||
|
|
Загрузка…
Ссылка в новой задаче