[commit: packages/directory] bgamari-patch-1, master: testscript: Stack on Windows switched back to .zip (8a34b64)

git at git.haskell.org git at git.haskell.org
Mon Apr 17 21:35:02 UTC 2017


Repository : ssh://git@git.haskell.org/directory

On branches: bgamari-patch-1,master
Link       : http://ghc.haskell.org/trac/ghc/changeset/8a34b640ff006b5176d7cb50660cef188a888ba3/directory

>---------------------------------------------------------------

commit 8a34b640ff006b5176d7cb50660cef188a888ba3
Author: Phil Ruffwind <rf at rufflewind.com>
Date:   Wed Dec 21 03:40:53 2016 -0500

    testscript: Stack on Windows switched back to .zip


>---------------------------------------------------------------

8a34b640ff006b5176d7cb50660cef188a888ba3
 tools/testscript | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tools/testscript b/tools/testscript
index 71a3840..95f720e 100755
--- a/tools/testscript
+++ b/tools/testscript
@@ -31,8 +31,12 @@ prepare() {
                     mv */stack .;;
                 MSYS*)
                     url=https://www.stackage.org/stack/windows-x86_64
-                    curl --retry 3 -fsLS "$url" | tar xzf -
-                    mv */stack.exe .;;
+                    curl --retry 3 -fsLSo stack.zip "$url"
+                    # download could be either .zip or .tar.gz
+                    7z x -aoa stack.zip stack.exe || {
+                        tar xzf stack.zip
+                        mv */stack.exe .
+                    };;
                 *)
                     printf >&2 "unknown uname: %s\n" "`uname`"
                     return 1;;



More information about the ghc-commits mailing list