lint: Only apply --interactive lint to testsuite .T files
[ghc.git] / .gitlab / darwin-init.sh
1 #!/bin/bash
2
3 set -e
4
5 toolchain=`pwd`/toolchain
6 PATH="$toolchain/bin:$PATH"
7
8 if [ -d "`pwd`/cabal-cache" ]; then
9 cp -Rf cabal-cache $HOME/.cabal
10 fi
11
12 if [ ! -e $toolchain/bin/ghc ]; then
13 mkdir -p tmp
14 cd tmp
15 ghc_tarball="https://downloads.haskell.org/~ghc/$GHC_VERSION/ghc-$GHC_VERSION-x86_64-apple-darwin.tar.xz"
16 echo "Fetching GHC from $ghc_tarball"
17 curl $ghc_tarball | tar -xJ
18 cd ghc-$GHC_VERSION
19 ./configure --prefix=$toolchain
20 make install
21 cd ../..
22 rm -Rf tmp
23 fi
24
25 if [ ! -e $toolchain/bin/cabal ]; then
26 cabal_tarball="https://downloads.haskell.org/~cabal/cabal-install-latest/cabal-install-2.4.1.0-x86_64-apple-darwin-sierra.tar.xz"
27 echo "Fetching cabal-install from $cabal_tarball"
28 curl $cabal_tarball | tar -xz
29 mv cabal $toolchain/bin
30 fi
31
32 if [ ! -e $toolchain/bin/happy ]; then
33 cabal update
34 cabal new-install happy --symlink-bindir=$toolchain/bin
35 fi
36
37 if [ ! -e $toolchain/bin/alex ]; then
38 cabal update
39 cabal new-install alex --symlink-bindir=$toolchain/bin
40 fi
41