Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pr/1062'
Browse files Browse the repository at this point in the history
  • Loading branch information
hasufell committed May 25, 2024
2 parents d487edf + 100e244 commit eb44a4f
Showing 1 changed file with 33 additions and 30 deletions.
63 changes: 33 additions & 30 deletions scripts/bootstrap/bootstrap-haskell
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,45 @@ ghver="0.1.22.0"
export GHCUP_SKIP_UPDATE_CHECK=yes
: "${BOOTSTRAP_HASKELL_DOWNLOADER:=curl}"

set_msys2_env_dir() {
case "${GHCUP_MSYS2_ENV}" in
"")
case "${arch}" in
x86_64|amd64)
GHCUP_MSYS2_ENV_DIR="mingw64" ;;
i*86)
GHCUP_MSYS2_ENV_DIR="mingw32" ;;
aarch64|arm64)
GHCUP_MSYS2_ENV_DIR="clangarm64" ;;
*) die "Unknown architecture: ${arch}" ;;
esac
;;
MSYS)
GHCUP_MSYS2_ENV_DIR="usr" ;;
UCRT64)
GHCUP_MSYS2_ENV_DIR="ucrt64" ;;
CLANG64)
GHCUP_MSYS2_ENV_DIR="clang64" ;;
CLANGARM64)
GHCUP_MSYS2_ENV_DIR="clangarm64" ;;
CLANG32)
GHCUP_MSYS2_ENV_DIR="clang32" ;;
MINGW64)
GHCUP_MSYS2_ENV_DIR="mingw64" ;;
MINGW32)
GHCUP_MSYS2_ENV_DIR="mingw32" ;;
*)
die "Invalid value for GHCUP_MSYS2_ENV. Valid values are: MSYS, UCRT64, CLANG64, CLANGARM64, CLANG32, MINGW64, MINGW32" ;;
esac
}

case "${plat}" in
MSYS*|MINGW*|CYGWIN*)
: "${GHCUP_INSTALL_BASE_PREFIX:=/c}"
GHCUP_DIR=$(cygpath -u "${GHCUP_INSTALL_BASE_PREFIX}/ghcup")
GHCUP_BIN=$(cygpath -u "${GHCUP_INSTALL_BASE_PREFIX}/ghcup/bin")
: "${GHCUP_MSYS2:=${GHCUP_DIR}/msys64}"
set_msys2_env_dir
;;
*)
: "${GHCUP_INSTALL_BASE_PREFIX:=$HOME}"
Expand All @@ -65,36 +98,6 @@ case "${plat}" in
;;
esac

case "${GHCUP_MSYS2_ENV}" in
"")
case "${arch}" in
x86_64|amd64)
GHCUP_MSYS2_ENV_DIR="mingw64" ;;
i*86)
GHCUP_MSYS2_ENV_DIR="mingw32" ;;
aarch64|arm64)
GHCUP_MSYS2_ENV_DIR="clangarm64" ;;
*) die "Unknown architecture: ${arch}" ;;
esac
;;
MSYS)
GHCUP_MSYS2_ENV_DIR="usr" ;;
UCRT64)
GHCUP_MSYS2_ENV_DIR="ucrt64" ;;
CLANG64)
GHCUP_MSYS2_ENV_DIR="clang64" ;;
CLANGARM64)
GHCUP_MSYS2_ENV_DIR="clangarm64" ;;
CLANG32)
GHCUP_MSYS2_ENV_DIR="clang32" ;;
MINGW64)
GHCUP_MSYS2_ENV_DIR="mingw64" ;;
MINGW32)
GHCUP_MSYS2_ENV_DIR="mingw32" ;;
*)
die "Invalid value for GHCUP_MSYS2_ENV. Valid values are: MSYS, UCRT64, CLANG64, CLANGARM64, CLANG32, MINGW64, MINGW32" ;;
esac

: "${BOOTSTRAP_HASKELL_GHC_VERSION:=recommended}"
: "${BOOTSTRAP_HASKELL_CABAL_VERSION:=recommended}"

Expand Down

0 comments on commit eb44a4f

Please sign in to comment.