2020-04-15 07:45:18 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -eux
|
|
|
|
|
|
|
|
. "$( cd "$(dirname "$0")" ; pwd -P )/../../ghcup_env"
|
|
|
|
|
2020-05-01 14:27:27 +00:00
|
|
|
mkdir -p "${TMPDIR}"
|
|
|
|
|
2021-06-09 17:03:48 +00:00
|
|
|
if [ $ARCH = 'ARM64' ] ; then
|
2021-08-14 15:10:48 +00:00
|
|
|
curl -sSfL https://downloads.haskell.org/~ghcup/aarch64-apple-darwin-ghcup > ./ghcup-bin
|
2021-06-11 09:52:20 +00:00
|
|
|
chmod +x ghcup-bin
|
2021-06-09 17:03:48 +00:00
|
|
|
else
|
|
|
|
curl -sSfL https://downloads.haskell.org/~ghcup/x86_64-apple-darwin-ghcup > ./ghcup-bin
|
2021-06-11 09:52:20 +00:00
|
|
|
chmod +x ghcup-bin
|
|
|
|
./ghcup-bin upgrade -i -f
|
2021-06-09 17:03:48 +00:00
|
|
|
fi
|
2021-06-11 09:52:20 +00:00
|
|
|
|
|
|
|
./ghcup-bin install ${GHC_VERSION}
|
|
|
|
./ghcup-bin set ${GHC_VERSION}
|
|
|
|
./ghcup-bin install-cabal ${CABAL_VERSION}
|
2020-04-15 07:45:18 +00:00
|
|
|
|
2021-06-15 12:00:30 +00:00
|
|
|
if [ $ARCH = 'ARM64' ] ; then
|
|
|
|
cabal update
|
|
|
|
mkdir vendored
|
|
|
|
cd vendored
|
|
|
|
cabal unpack network-3.1.2.1
|
|
|
|
cd network*
|
|
|
|
autoreconf -fi
|
|
|
|
cd ../..
|
|
|
|
fi
|
|
|
|
|
2020-04-15 07:45:18 +00:00
|
|
|
exit 0
|