Skip to content

Instantly share code, notes, and snippets.

@erewok
Created April 25, 2017 05:10
Show Gist options
  • Save erewok/dd2405a8958a9a1f9cbf5e8a33f478d8 to your computer and use it in GitHub Desktop.
Save erewok/dd2405a8958a9a1f9cbf5e8a33f478d8 to your computer and use it in GitHub Desktop.
install stack for travis
set -o errexit -o verbose
if test -f "$HOME/.local/bin/stack"
then
echo 'Stack is already installed.'
else
echo "Installing Stack for $TRAVIS_OS_NAME..."
URL="https://www.stackage.org/stack/$TRAVIS_OS_NAME-x86_64"
curl --location "$URL" > stack.tar.gz
gunzip stack.tar.gz
tar -x -f stack.tar --strip-components 1
mkdir -p "$HOME/.local/bin"
mv stack "$HOME/.local/bin/"
rm stack.tar
fi
stack --version
@erewok
Copy link
Author

erewok commented Apr 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment