Commit 5744f277 authored by Eric Wong's avatar Eric Wong Committed by Martin Langhoff

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: 's avatarEric Wong <normalperson@yhbt.net>
Signed-off-by: 's avatarMartin Langhoff <martin@catalyst.net.nz>
parent f88961a8
......@@ -88,9 +88,8 @@ END
@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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment