summaryrefslogtreecommitdiff
path: root/git-archimport.perl
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2005-11-24 07:50:27 (GMT)
committerMartin Langhoff <martin@catalyst.net.nz>2005-12-11 01:41:40 (GMT)
commit5744f27794c284758a5c7956b9e5d5669c5dd318 (patch)
treea9d5797d31137fdf0f44700e158c35b715c54102 /git-archimport.perl
parentf88961a85f14dd3fae4f5204f8187ba5d9a7646e (diff)
downloadgit-5744f27794c284758a5c7956b9e5d5669c5dd318.zip
git-5744f27794c284758a5c7956b9e5d5669c5dd318.tar.gz
git-5744f27794c284758a5c7956b9e5d5669c5dd318.tar.bz2
archimport: fix -t tmpdir switch
set TMPDIR env correctly if -t <tmpdir> is passed from the command-line. setting TMPDIR => 1 as an argument to tempdir() has no effect otherwise Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Diffstat (limited to 'git-archimport.perl')
-rwxr-xr-xgit-archimport.perl5
1 files changed, 2 insertions, 3 deletions
diff --git a/git-archimport.perl b/git-archimport.perl
index b7e2480..2ed2e3c 100755
--- a/git-archimport.perl
+++ b/git-archimport.perl
@@ -88,9 +88,8 @@ usage if $opt_h;
@ARGV >= 1 or usage();
my @arch_roots = @ARGV;
-my ($tmpdir, $tmpdirname) = tempdir('git-archimport-XXXXXX', TMPDIR => 1, CLEANUP => 1);
-my $tmp = $opt_t || 1;
-$tmp = tempdir('git-archimport-XXXXXX', TMPDIR => 1, CLEANUP => 1);
+$ENV{'TMPDIR'} = $opt_t if $opt_t; # $ENV{TMPDIR} will affect tempdir() calls:
+my $tmp = tempdir('git-archimport-XXXXXX', TMPDIR => 1, CLEANUP => 1);
$opt_v && print "+ Using $tmp as temporary directory\n";
my @psets = (); # the collection