From 28a10778337caf923fe1bbacf7186cb1b49fbdcc Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Mon, 13 Apr 2020 15:22:16 +0200 Subject: [PATCH] Add i386 ghcup binary --- app/ghcup-gen/GHCupDownloads.hs | 11 ++++++++++ bootstrap-haskell | 39 +++++++++++++++++++++++---------- 2 files changed, 39 insertions(+), 11 deletions(-) diff --git a/app/ghcup-gen/GHCupDownloads.hs b/app/ghcup-gen/GHCupDownloads.hs index b3cedd3..ba8ac6f 100644 --- a/app/ghcup-gen/GHCupDownloads.hs +++ b/app/ghcup-gen/GHCupDownloads.hs @@ -984,6 +984,13 @@ cabal_3200_64_darwin = DownloadInfo ------------- +ghcup_010_32_linux :: DownloadInfo +ghcup_010_32_linux = DownloadInfo + [uri|https://github.com/hasufell/ghcup-hs/releases/download/v0.1.0/i386-linux-ghcup-0.1.0|] + Nothing + "ce95fd3044ea249c2ea02e122112a787d710cc4be2dcf1e78d8c68b540a70920" + + ghcup_010_64_linux :: DownloadInfo ghcup_010_64_linux = DownloadInfo [uri|https://github.com/hasufell/ghcup-hs/releases/download/v0.1.0/x86_64-linux-ghcup-0.1.0|] @@ -1892,6 +1899,10 @@ ghcupDownloads = M.fromList , (FreeBSD, M.fromList [(Nothing, ghcup_010_64_freebsd)]) ] ) + , ( A_32 + , M.fromList + [(Linux UnknownLinux, M.fromList [(Nothing, ghcup_010_32_linux)])] + ) ] ) ] diff --git a/bootstrap-haskell b/bootstrap-haskell index 6efc2cf..65c42b4 100755 --- a/bootstrap-haskell +++ b/bootstrap-haskell @@ -27,24 +27,41 @@ download_ghcup() { _plat="$(uname -s)" _arch=$(uname -m) - case "${_arch}" in - x86_64|amd64) - ;; - i*86) - die "i386 currently not supported!" - ;; - *) die "Unknown architecture: ${_arch}" - ;; - esac - case "${_plat}" in "linux"|"Linux") - _url=https://www.haskell.org/ghcup/bin/x86_64-linux-ghcup + case "${_arch}" in + x86_64|amd64) + _url=https://www.haskell.org/ghcup/bin/x86_64-linux-ghcup + ;; + i*86) + _url=https://www.haskell.org/ghcup/bin/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://www.haskell.org/ghcup/bin/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 case "$(sw_vers -productVersion || echo "none")" in 10.15.*) _url=https://www.haskell.org/ghcup/bin/x86_64-apple-darwin-10.14-ghcup ;; 10.14.*) _url=https://www.haskell.org/ghcup/bin/x86_64-apple-darwin-10.14-ghcup ;;