Prechádzať zdrojové kódy

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

Holger Weiss 18 rokov pred
rodič
commit
ff8bf04d3a
1 zmenil súbory, kde vykonal 3 pridanie a 2 odobranie
  1. 3 2
      tools/tinderbox_build

+ 3 - 2
tools/tinderbox_build

@@ -21,6 +21,7 @@ chomp($myhost);
 my ($host, $junk) = split(/\./, $myhost);
 my ($host, $junk) = split(/\./, $myhost);
 	
 	
 my $BuildAdministrator = $ENV{TINDERBOX_BUILD_ADMIN} || "$ENV{'USER'}\@$myhost";
 my $BuildAdministrator = $ENV{TINDERBOX_BUILD_ADMIN} || "$ENV{'USER'}\@$myhost";
+my $TmpDir = $ENV{TMPDIR} || "/tmp";
 
 
 #Default values of cmdline opts
 #Default values of cmdline opts
 my $ReportStatus = 0;  # Do not send results to server
 my $ReportStatus = 0;  # Do not send results to server
@@ -266,14 +267,14 @@ sub make {
 sub maketest {
 sub maketest {
         # Tests
         # Tests
         print LOG "LANG=C make test 2>&1\n";
         print LOG "LANG=C make test 2>&1\n";
-        open( MAKE, "LANG=C make test && make install DESTDIR=/tmp/tinderbox_build.$$ && make install-strip DESTDIR=/tmp/tinderbox_build2.$$ 2>&1 |");
+        open( MAKE, "LANG=C make test && make install DESTDIR=$TmpDir/tinderbox_build.$$ && make install-strip DESTDIR=$TmpDir/tinderbox_build2.$$ 2>&1 |");
 	while ( <MAKE> ) {
 	while ( <MAKE> ) {
 		print $_;
 		print $_;
 		print LOG $_;
 		print LOG $_;
 	}
 	}
 	close( MAKE);
 	close( MAKE);
 	my $rc = $?;
 	my $rc = $?;
-	system("rm -fr /tmp/tinderbox_build.$$ /tmp/tinderbox_build2.$$");
+	system("rm -fr $TmpDir/tinderbox_build.$$ $TmpDir/tinderbox_build2.$$");
 	return ! $rc;
 	return ! $rc;
 }
 }