2020-04-18 19:16:03 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -eux
|
|
|
|
|
|
|
|
# pkg install --force --yes --no-repo-update curl gcc gmp gmake ncurses perl5 libffi libiconv
|
|
|
|
|
|
|
|
. "$( cd "$(dirname "$0")" ; pwd -P )/../../ghcup_env"
|
|
|
|
|
2020-05-01 14:27:27 +00:00
|
|
|
mkdir -p "${TMPDIR}"
|
|
|
|
|
2022-02-05 18:43:24 +00:00
|
|
|
if freebsd-version | grep -E '^12.*' ; then
|
|
|
|
freebsd_ver=12
|
|
|
|
elif freebsd-version | grep -E '^13.*' ; then
|
|
|
|
freebsd_ver=13
|
|
|
|
else
|
|
|
|
(>&2 echo "Unsupported FreeBSD version! Please report a bug at https://gitlab.haskell.org/haskell/ghcup-hs/-/issues")
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
curl -sSfL https://downloads.haskell.org/~ghcup/x86_64-freebsd${freebsd_ver}-ghcup > ./ghcup-bin
|
2020-04-18 19:16:03 +00:00
|
|
|
chmod +x ghcup-bin
|
|
|
|
|
2021-09-10 17:48:42 +00:00
|
|
|
./ghcup-bin -v upgrade -i -f
|
|
|
|
./ghcup-bin -v install ${GHC_VERSION}
|
|
|
|
./ghcup-bin -v set ${GHC_VERSION}
|
|
|
|
./ghcup-bin -v install-cabal ${CABAL_VERSION}
|
2020-04-18 19:16:03 +00:00
|
|
|
|
|
|
|
exit 0
|