summaryrefslogtreecommitdiff
path: root/Build/cdbuild
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-08-20 18:05:13 +0000
committerKarl Berry <karl@freefriends.org>2007-08-20 18:05:13 +0000
commit4416100f8062542a9bf2ee907e6875183dd7c358 (patch)
tree3673d837e0d91756b7504d41cca52d957f32d493 /Build/cdbuild
parent33bb92baf2f4e3415dc95f87eeb939e09530b501 (diff)
use $TMPDIR consistently.
git-svn-id: svn://tug.org/texlive/trunk@4778 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/cdbuild')
-rwxr-xr-xBuild/cdbuild/place27
1 files changed, 14 insertions, 13 deletions
diff --git a/Build/cdbuild/place b/Build/cdbuild/place
index 11737b258da..8d3108eda63 100755
--- a/Build/cdbuild/place
+++ b/Build/cdbuild/place
@@ -21,9 +21,6 @@ use TeXLive::TLPOBJ;
use TeXLive::TLPDB;
use TeXLive::TLTREE;
-$newpackage = 0;
-%dirs = (); # dirs we make changes in
-
if ($ARGV[0] eq "-n") {
$chicken = 1;
shift;
@@ -35,6 +32,10 @@ print "place: chicken mode = $chicken\n";
die "usage: $0 PKGNAME\n" unless @ARGV == 1;
$package = $ARGV[0];
+$newpackage = 0;
+%dirs = (); # dirs we make changes in
+$TMP = $ENV{"TMPDIR"} || "/tmp";
+
xchdir (dirname($0) . "/cooked");
$mydir = getcwd();
-d "$mydir/$package" || die "$0: No such package in $mydir: $package\n";
@@ -101,31 +102,31 @@ if (!defined($tlpold)) {
push @oldfiles, $tlpold->srcfiles;
push @oldfiles, $tlpold->runfiles;
push @oldfiles, $tlpold->docfiles;
- `rm -f /tmp/pkgfiles.old`;
+ `rm -f $TMP/tlplace.old`;
foreach (sort @oldfiles) {
- `echo $_ >> /tmp/pkgfiles.old`;
+ `echo $_ >> $TMP/tlplace.old`;
}
my @newfiles;
push @newfiles, $tlpnew->srcfiles;
push @newfiles, $tlpnew->runfiles;
push @newfiles, $tlpnew->docfiles;
- `rm -f /tmp/pkgfiles.new`;
+ `rm -f $TMP/tlplace.new`;
foreach (sort @newfiles) {
- `echo $_ >> /tmp/pkgfiles.new`;
+ `echo $_ >> $TMP/tlplace.new`;
}
- print `comm -3 /tmp/pkgfiles.new /tmp/pkgfiles.old`;
- my @difffiles = `comm -12 /tmp/pkgfiles.new /tmp/pkgfiles.old`;
+ print `comm -3 $TMP/tlplace.new $TMP/tlplace.old`;
+ my @difffiles = `comm -12 $TMP/tlplace.new $TMP/tlplace.old`;
chomp (@difffiles);
my $sum = 0;
- unlink ("/tmp/pkgfiles.diff");
+ unlink ("$TMP/tlplace.diff");
my $diff_cmd = "diff --ignore-all-space -U 0";
foreach (@difffiles) {
- my @foo = `$diff_cmd $M/$_ $mydir/$package/$_ | tee -a /tmp/pkgfiles.diff`;
+ my @foo = `$diff_cmd $M/$_ $mydir/$package/$_ | tee -a $TMP/tlplace.diff`;
$sum += ($#foo + 1);
}
my $nrcommfiles = $#difffiles + 1;
print "$nrcommfiles common files, ~$sum lines different\n\n\f\n";
- #`rm -f /tmp/pkgfiles.new /tmp/pkgfiles.old /tmp/pkgfiles.diff`;
+ #`rm -f $TMP/tlplace.new $TMP/tlplace.old $TMP/tlplace.diff`;
}
@@ -176,7 +177,7 @@ $dirs{"$M/tlpkg/tlpsrc/$package.tlpsrc"}++;
#
# also write dir list to a separate file, for easy passing to a commit.
#
-$DIRLIST = ">" . ($ENV{"TMPDIR"} || "/tmp") . "/tlplace.dirs";
+$DIRLIST = ">$TMP/tlplace.dirs";
open (DIRLIST) || die "open($DIRLIST) failed: $!";
#
for my $dir (sort keys %dirs) {