warnings.pl: Use command-line arg to specify tree

This commit is contained in:
slamm%netscape.com 2000-01-08 02:04:26 +00:00
Родитель 731745f837
Коммит 740dc38bf8
2 изменённых файлов: 8 добавлений и 3 удалений

Просмотреть файл

@ -74,7 +74,7 @@ require "$tinderbox{tree}/treedata.pl" if -r "$tinderbox{tree}/treedata.pl";
if (defined $warning_buildnames_pat if (defined $warning_buildnames_pat
and $tinderbox{build} =~ /^$warning_buildnames_pat$/ and $tinderbox{build} =~ /^$warning_buildnames_pat$/
and $tinderbox{status} eq 'success') { and $tinderbox{status} eq 'success') {
system './warnings.pl'; system './warnings.pl $tinderbox{tree}';
} }
# Bloat data # Bloat data

Просмотреть файл

@ -74,15 +74,20 @@ use FileHandle;
# {...}, ... # {...}, ...
# ) # )
sub usage {
warn "usage: warnings.pl <tree_directory>\n";
}
# This is for gunzip (should add a configure script to handle this). # This is for gunzip (should add a configure script to handle this).
$ENV{PATH} .= ":/usr/local/bin"; $ENV{PATH} .= ":/usr/local/bin";
$debug = 1 if $ARGV[0] eq '--debug'; $debug = 1, shift @ARGV if $ARGV[0] eq '--debug';
&usage, die "Error: Not enough arguments\n" if $#ARGV == -1;
# Load tinderbox build data. # Load tinderbox build data.
# (So we can find the last successful build for the tree of intestest.) # (So we can find the last successful build for the tree of intestest.)
$tree = 'SeaMonkey'; $tree = shift @ARGV;
# tinderbox/tbglobals.pl uses many shameful globals # tinderbox/tbglobals.pl uses many shameful globals
$form{tree} = $tree; $form{tree} = $tree;
require 'tbglobals.pl'; require 'tbglobals.pl';