elm/bin/install-elm-format

26 lines
605 B
Text
Raw Normal View History

2017-10-11 01:42:18 +00:00
#!/usr/bin/env bash
OS=$(
case $(uname) in
(Darwin*)
echo "mac";;
(Linux*)
echo "linux";;
(Windows*)
echo "windows";;
(MINGW*)
echo "windows";;
(*)
echo "linux";;
esac)
if [ "$OS" == "windows" ]; then
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
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