From 020fd23e346b1ffbe03ccb3a0bbae814d2e1379d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sun, 11 May 2008 20:01:36 +0000 Subject: rollback for win32, part1 git-svn-id: svn://tug.org/texlive/trunk@8065 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/TLPOBJ.pm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'Master/tlpkg/TeXLive/TLPOBJ.pm') diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm index 5866dca2e51..67800fe959c 100644 --- a/Master/tlpkg/TeXLive/TLPOBJ.pm +++ b/Master/tlpkg/TeXLive/TLPOBJ.pm @@ -7,7 +7,7 @@ package TeXLive::TLPOBJ; use TeXLive::TLConfig qw($DefaultCategory $CategoriesRegexp $MetaCategoriesRegexp $InfraLocation); -use TeXLive::TLUtils; +use TeXLive::TLUtils qw/win32 tllog/; #use File::Path; use TeXLive::TLTREE; #use FileHandle; # format_name in writeout, no idea how to rewrite @@ -508,7 +508,7 @@ sub make_container { # load Cwd only if necessary ... require Cwd; my $cwd = &Cwd::getcwd; - if ("$destdir" !~ m@^/@) { + if ("$destdir" !~ m@^(.:)?/@) { # we have an relative containerdir, so we have to make it absolute $destdir = "$cwd/$destdir"; } @@ -547,7 +547,13 @@ sub make_container { my @cmdline = ($tar, "-c", "-f", "$destdir/$tarname", "--files-from=-"); unlink("$destdir/$containername"); unlink("$destdir/$tarname"); - open ZIP, "|-", @cmdline or die "Cannot open container program @cmdline: $!"; + if (win32()) { + # we have to hack around this stupid win32 ... + open ZIP, "|$tar -c -f \"$destdir/$tarname\" --files-from=-" + or die "Cannot open container program $tar -c -f \"$destdir/$tarname\" --files-from=-: $!"; + } else { + open ZIP, "|-", @cmdline or die "Cannot open container program @cmdline: $!"; + } map { if (! -f $_) { print STDERR "!!!Error: non-existent $_\n"; -- cgit v1.2.3