From 92305de08b2826760a0839d991c7ccafb91a1d51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Nygaard=20=C3=85snes?= Date: Tue, 10 Oct 2017 20:41:48 +0200 Subject: [PATCH] Download elm-format on windows --- bin/install-elm-format | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/bin/install-elm-format b/bin/install-elm-format index 23da76e..7953469 100755 --- a/bin/install-elm-format +++ b/bin/install-elm-format @@ -8,12 +8,20 @@ case $(uname) in echo "linux";; (Windows*) echo "windows";; + (MINGW*) + echo "windows";; (*) echo "linux";; esac) -URL=https://github.com/avh4/elm-format/releases/download/0.6.1-alpha/elm-format-0.18-0.6.1-alpha-$OS-x64.tgz - -curl -L $URL | tar -xvzO > bin/elm-format +if [ "$OS" == "windows" ]; then + echo $URL + URL=https://github.com/avh4/elm-format/releases/download/0.6.1-alpha/elm-format-0.18-0.6.1-alpha-win-i386.zip + curl -L $URL | funzip > bin/elm-format +else + echo $URL + URL=https://github.com/avh4/elm-format/releases/download/0.6.1-alpha/elm-format-0.18-0.6.1-alpha-$OS-x64.tgz + curl -L $URL | tar -xvzO > bin/elm-format +fi chmod u+x bin/elm-format