summaryrefslogtreecommitdiff
path: root/bin/check_build_logs
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-03-19 02:52:33 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-03-19 02:52:33 +0000
commita9cb029fb3ecc1a431805ea310a6b6eb117cef91 (patch)
treedff12fd6af2d49ed113789970bb5da755f8169c2 /bin/check_build_logs
parent41351e3a3780cd0589ca74e24db3f2fe06f8e20b (diff)
downloadATCD-a9cb029fb3ecc1a431805ea310a6b6eb117cef91.tar.gz
ChangeLogTag: Sat Mar 18 20:51:06 2000 David L. Levine <levine@cs.wustl.edu>
Diffstat (limited to 'bin/check_build_logs')
-rwxr-xr-xbin/check_build_logs31
1 files changed, 27 insertions, 4 deletions
diff --git a/bin/check_build_logs b/bin/check_build_logs
index 178ab1983c5..93876bae517 100755
--- a/bin/check_build_logs
+++ b/bin/check_build_logs
@@ -8,7 +8,8 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use strict;
-my $usage="$0 [-l log directory] [-m mail recipient(s)] [-p purify output]\n";
+my $usage = "$0 [-l log directory] [-m mail recipient(s)] " .
+ "[-p purify output] [-u URL prefix]\n";
####
#### Configuration parameters.
@@ -27,9 +28,10 @@ $ENV{'LD_LIBRARY_PATH'} = '/opt/SUNWspro_5.0/dt/lib:/usr/openwin/lib:/usr/lib:/p
$ENV{'TMPDIR'} = '/tmp';
$ENV{'USER'} = $ENV{'LOGNAME'};
-my $log_directory = '/project/danzontmp/levine/build-logs';
+my $log_directory = '/project/danzontmp/levine/build-logs/';
my $mail_recipients = '';
my $purify = '';
+my $urlprefix = '';
####
#### Process command line args.
@@ -59,6 +61,14 @@ while ($#ARGV >= $[) {
print STDERR "$0: must provide argument for -p option\n";
die $usage;
}
+ } elsif ($ARGV[0] eq '-u') {
+ if ($ARGV[1] !~ /^-/) {
+ $urlprefix = $ARGV[1];
+ shift;
+ } else {
+ print STDERR "$0: must provide argument for -u option\n";
+ die $usage;
+ }
} elsif ($ARGV[0] eq '-?') {
print "$usage";
exit;
@@ -136,9 +146,22 @@ if ($#output == -1) {
select MAIL;
}
- print "This is an automatically generated message.\n\n";
- print "Log files are in $log_directory.\n\n";
+ print "This is an automatically generated message.\n\n"
+ if "$mail_recipients";
+ print "Log files are in $log_directory\n";
+
+ if ("$urlprefix") {
+ #### Print URL for each log file, using $urlprefix.
+ print "They are also available at:\n";
+
+ my @logs = split /\s+/, $log_files;
+ foreach my $log (@logs) {
+ $log =~ s%^\./%%; #### Remove leading ./
+ print " $urlprefix$log\n";
+ }
+ }
+ print "\n";
print @output;
if ("$mail_recipients") {