Commit b9c414a4 authored by Julian Ospald's avatar Julian Ospald 🍵

Point to new ghcup

parent d045b480
Pipeline #17974 canceled with stage
in 13 minutes and 51 seconds
......@@ -1603,11 +1603,57 @@ upgrade() {
status_message "Updating ${SCRIPT}"
(
_plat="$(uname -s)"
_arch=$(uname -m)
case "${_plat}" in
"linux"|"Linux")
case "${_arch}" in
x86_64|amd64)
_url=https://downloads.haskell.org/~ghcup/x86_64-linux-ghcup
;;
i*86)
_url=https://downloads.haskell.org/~ghcup/i386-linux-ghcup
;;
*) die "Unknown architecture: ${_arch}"
;;
esac
;;
"FreeBSD"|"freebsd")
case "${_arch}" in
x86_64|amd64)
;;
i*86)
die "i386 currently not supported!"
;;
*) die "Unknown architecture: ${_arch}"
;;
esac
_url=https://downloads.haskell.org/~ghcup/x86_64-portbld-freebsd-ghcup
;;
"Darwin"|"darwin")
case "${_arch}" in
x86_64|amd64)
;;
i*86)
die "i386 currently not supported!"
;;
*) die "Unknown architecture: ${_arch}"
;;
esac
_url=https://downloads.haskell.org/~ghcup/x86_64-apple-darwin-ghcup ;;
*) die "Unknown platform: ${_plat}"
;;
esac
edo cd "$(mktempdir)"
download "${SCRIPT_UPDATE_URL}"
download_to_stdout "${_url}" > ghcup
edo chmod +x ghcup
edo mv -f ghcup "${target_location}"/ghcup
unset _plat _arch _url
) || die "failed to install"
status_message "Done"
......@@ -2091,6 +2137,10 @@ fi
>&2 warning_message "ghcup has been rewritten in haskell. Please upgrade again via 'ghcup upgrade'"
##############################################
#--[ Command line parsing and entry point ]--#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment