2019-12-11 10:39:52 +03:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -ex
|
|
|
|
|
|
|
|
mkdir -p ~/.local/bin
|
|
|
|
|
|
|
|
# OSX
|
2019-12-11 10:46:03 +03:00
|
|
|
# curl -L https://get.haskellstack.org/stable/osx-x86_64.tar.gz | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin
|
2019-12-11 10:39:52 +03:00
|
|
|
|
|
|
|
mkdir -p tmp
|
|
|
|
|
|
|
|
pax="https://get.haskellstack.org/stable/linux-x86_64.tar.gz"
|
|
|
|
|
2019-12-11 10:46:03 +03:00
|
|
|
curl -L $pax | tar xz -C tmp
|
2019-12-11 10:39:52 +03:00
|
|
|
|
|
|
|
mv tmp/stack-*/stack ~/.local/bin
|
|
|
|
|
|
|
|
# Use the more reliable S3 mirror of Hackage
|
|
|
|
mkdir -p ~/.cabal
|
|
|
|
|
|
|
|
cat > ~/.cabal/config <<EOF
|
|
|
|
remote-repo: hackage.haskell.org:http://hackage.fpcomplete.com/
|
|
|
|
remote-repo-cache: $HOME/.cabal/packages
|
|
|
|
EOF
|