Add support for tinderbox(1)'s -h option.

This commit is contained in:
Dag-Erling Smørgrav 2003-10-10 21:13:37 +00:00
parent 8843f010b9
commit f5e8ed3d85
2 changed files with 10 additions and 2 deletions

View file

@ -27,7 +27,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd August 1, 2003
.Dd October 10, 2003
.Dt TBMASTER 1
.Os
.Sh NAME
@ -130,6 +130,11 @@ environment variable.
Note that it will not be defined unless it passes some simple sanity
checks.
Read-only.
.It HOSTNAME
.Pq Vt single
The name of the host running the tinderbox.
This is used for cosmetic purposes only.
No default value.
.It LOGDIR
.Pq Vt single
The location of the log directory.

View file

@ -35,7 +35,7 @@ use Fcntl qw(:DEFAULT :flock);
use POSIX;
use Getopt::Long;
my $VERSION = "2.1";
my $VERSION = "2.2";
my $COPYRIGHT = "Copyright (c) 2003 Dag-Erling Smørgrav. " .
"All rights reserved.";
@ -49,6 +49,7 @@ my %CONFIG = (
'PLATFORMS' => [ 'i386' ],
'DATE' => '',
'SANDBOX' => '/tmp/tinderbox',
'HOSTNAME' => '',
'LOGDIR' => '%%SANDBOX%%/logs',
'TARGETS' => [ 'update', 'world' ],
'OPTIONS' => [],
@ -187,6 +188,8 @@ sub tinderbox($$$) {
# Fork and start the tinderbox
my @args = @{$CONFIG{'OPTIONS'}};
push(@args, "--hostname=" . expand('HOSTNAME'))
if ($CONFIG{'HOSTNAME'});
push(@args, "--sandbox=" . expand('SANDBOX'));
push(@args, "--branch=$branch");
push(@args, "--arch=$arch");