Index: apps/build.tcl =================================================================== diff -u -rdd6a0a0b50197df4c8b442b7c9f43ec4410f2b8f -r00ac4c06c0bd3ffbf16c098d703040974f439ae0 --- apps/build.tcl (.../build.tcl) (revision dd6a0a0b50197df4c8b442b7c9f43ec4410f2b8f) +++ apps/build.tcl (.../build.tcl) (revision 00ac4c06c0bd3ffbf16c098d703040974f439ae0) @@ -32,29 +32,36 @@ ::http::geturl $URL \ -binary true \ -channel $fh + close $fh + # seek $fh 0 + # zlib push gunzip $fh + # ::tar::untar $fh -chan + + exec >@stdout 2>@stderr bash -lc "7z x $tarball -so | 7z x -aoa -si -ttar -o tcl" - seek $fh 0 - zlib push gunzip $fh - ::tar::untar $fh -chan - } on error {e opts} { file delete -force tcl return -options $opts $e } finally { - close $fh + catch {close $fh} file delete -force $tarball } + + + } else { # fall back to using curl exec >@stdout 2>@stderr bash -lc "curl -L -k -o $tarball $URL" - set fh [open $tarball rb] + # set fh [open $tarball rb] try { - zlib push gunzip $fh - ::tar::untar $fh -chan + # zlib push gunzip $fh + # ::tar::untar $fh -chan + exec >@stdout 2>@stderr bash -lc "7z x $tarball -so | 7z x -aoa -si -ttar -o tcl" + } finally { - close $fh + # close $fh file delete -force $tarball } }