Cygwin's tar can't seem to unzip and extract simultaneously.
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Thu, 20 Sep 2001 19:01:15 +0000 (19:01 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Thu, 20 Sep 2001 19:01:15 +0000 (19:01 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@61 fdb21ef1-2011-0410-befe-b5e4ea1792b1

Construct

index 853311cc559c0cceb1d87ce78ec416f316b74952..1dfcd30dfd840cf6f19920e76db16ac62a06f523 100644 (file)
--- a/Construct
+++ b/Construct
@@ -184,9 +184,17 @@ for $dir ('script', 'engine') {
 
     my @unpack_files = map("$unpack/$pkg-$version/$_", @files);
 
+    # We'd like to replace the last three lines with the following:
+    #
+    #  tar zxf %< -C $unpack
+    #
+    # but that gives heartburn to Cygwin's tar, so work around it
+    # with separate zcat-tar-rm commands.
     Command $env [@unpack_files], $archive, qq(
        rm -rf $unpack/$pkg-$version
-       tar zxf %< -C $unpack
+       zcat %< > .temp
+       tar xf .temp -C $unpack
+       rm -f .temp
     );
 
     #