diff options
author | Holger Weiss <hweiss@users.sourceforge.net> | 2007-07-27 15:49:01 +0000 |
---|---|---|
committer | Holger Weiss <hweiss@users.sourceforge.net> | 2007-07-27 15:49:01 +0000 |
commit | ff8bf04d3aed0a2e6abac1178a3602defd14b854 (patch) | |
tree | 7e33add5300d42418ccc12c2a1c7b56461abcb3e | |
parent | 0a02314e8d520766a9a00712ab49c02f1ebb7a63 (diff) | |
download | monitoring-plugins-ff8bf04d3aed0a2e6abac1178a3602defd14b854.tar.gz |
If the TMPDIR environment variable is set, use that instead of "/tmp" as
the installation directory.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1767 f882894a-f735-0410-b71e-b25c423dba1c
-rwxr-xr-x | tools/tinderbox_build | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/tinderbox_build b/tools/tinderbox_build index 1ace2b03..70fb07a3 100755 --- a/tools/tinderbox_build +++ b/tools/tinderbox_build | |||
@@ -21,6 +21,7 @@ chomp($myhost); | |||
21 | my ($host, $junk) = split(/\./, $myhost); | 21 | my ($host, $junk) = split(/\./, $myhost); |
22 | 22 | ||
23 | my $BuildAdministrator = $ENV{TINDERBOX_BUILD_ADMIN} || "$ENV{'USER'}\@$myhost"; | 23 | my $BuildAdministrator = $ENV{TINDERBOX_BUILD_ADMIN} || "$ENV{'USER'}\@$myhost"; |
24 | my $TmpDir = $ENV{TMPDIR} || "/tmp"; | ||
24 | 25 | ||
25 | #Default values of cmdline opts | 26 | #Default values of cmdline opts |
26 | my $ReportStatus = 0; # Do not send results to server | 27 | my $ReportStatus = 0; # Do not send results to server |
@@ -266,14 +267,14 @@ sub make { | |||
266 | sub maketest { | 267 | sub maketest { |
267 | # Tests | 268 | # Tests |
268 | print LOG "LANG=C make test 2>&1\n"; | 269 | print LOG "LANG=C make test 2>&1\n"; |
269 | open( MAKE, "LANG=C make test && make install DESTDIR=/tmp/tinderbox_build.$$ && make install-strip DESTDIR=/tmp/tinderbox_build2.$$ 2>&1 |"); | 270 | open( MAKE, "LANG=C make test && make install DESTDIR=$TmpDir/tinderbox_build.$$ && make install-strip DESTDIR=$TmpDir/tinderbox_build2.$$ 2>&1 |"); |
270 | while ( <MAKE> ) { | 271 | while ( <MAKE> ) { |
271 | print $_; | 272 | print $_; |
272 | print LOG $_; | 273 | print LOG $_; |
273 | } | 274 | } |
274 | close( MAKE); | 275 | close( MAKE); |
275 | my $rc = $?; | 276 | my $rc = $?; |
276 | system("rm -fr /tmp/tinderbox_build.$$ /tmp/tinderbox_build2.$$"); | 277 | system("rm -fr $TmpDir/tinderbox_build.$$ $TmpDir/tinderbox_build2.$$"); |
277 | return ! $rc; | 278 | return ! $rc; |
278 | } | 279 | } |
279 | 280 | ||