Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
9daca301a0 |
@ -126,10 +126,10 @@ _eghcup() {
|
|||||||
fi
|
fi
|
||||||
if [ -z "${BOOTSTRAP_HASKELL_VERBOSE}" ] ; then
|
if [ -z "${BOOTSTRAP_HASKELL_VERBOSE}" ] ; then
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
"${GHCUP_BIN}/ghcup" ${args} "$@"
|
"ghcup" ${args} "$@"
|
||||||
else
|
else
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
"${GHCUP_BIN}/ghcup" ${args} --verbose "$@"
|
"ghcup" ${args} --verbose "$@"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -228,7 +228,7 @@ posix_realpath() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
download_ghcup() {
|
download_ghcup() {
|
||||||
|
if ! command -V "ghcup" >/dev/null 2>&1 ; then
|
||||||
case "${plat}" in
|
case "${plat}" in
|
||||||
"linux"|"Linux")
|
"linux"|"Linux")
|
||||||
case "${arch}" in
|
case "${arch}" in
|
||||||
@ -321,6 +321,7 @@ download_ghcup() {
|
|||||||
edo chmod +x "${GHCUP_BIN}"/ghcup
|
edo chmod +x "${GHCUP_BIN}"/ghcup
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
edo mkdir -p "${GHCUP_DIR}"
|
edo mkdir -p "${GHCUP_DIR}"
|
||||||
|
|
||||||
@ -344,7 +345,9 @@ download_ghcup() {
|
|||||||
|
|
||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1090
|
||||||
edo . "${GHCUP_DIR}"/env
|
edo . "${GHCUP_DIR}"/env
|
||||||
eghcup upgrade
|
if [ -z "${BOOTSTRAP_HASKELL_NO_UPGRADE}" ] ; then
|
||||||
|
ghcup upgrade || yellow "Failed to upgrade ghcup, continuing anyway"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Figures out the users login shell and sets
|
# Figures out the users login shell and sets
|
||||||
@ -733,13 +736,7 @@ fi
|
|||||||
|
|
||||||
edo mkdir -p "${GHCUP_BIN}"
|
edo mkdir -p "${GHCUP_BIN}"
|
||||||
|
|
||||||
if command -V "ghcup" >/dev/null 2>&1 ; then
|
|
||||||
if [ -z "${BOOTSTRAP_HASKELL_NO_UPGRADE}" ] ; then
|
|
||||||
_eghcup upgrade || download_ghcup
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
download_ghcup
|
download_ghcup
|
||||||
fi
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
if [ -n "${BOOTSTRAP_HASKELL_YAML}" ] ; then (>&2 ghcup -s "${BOOTSTRAP_HASKELL_YAML}" tool-requirements) ; else (>&2 ghcup tool-requirements) ; fi
|
if [ -n "${BOOTSTRAP_HASKELL_YAML}" ] ; then (>&2 ghcup -s "${BOOTSTRAP_HASKELL_YAML}" tool-requirements) ; else (>&2 ghcup tool-requirements) ; fi
|
||||||
|
Loading…
Reference in New Issue
Block a user