Compare commits

...

6 Commits

2 changed files with 16 additions and 17 deletions

View File

@@ -336,7 +336,7 @@ com =
( Install ( Install
<$> info <$> info
(installParser <**> helper) (installParser <**> helper)
( progDesc "Install or update GHC/cabal/HLS" ( progDesc "Install or update GHC/cabal/HLS/stack"
<> footerDoc (Just $ text installToolFooter) <> footerDoc (Just $ text installToolFooter)
) )
) )
@@ -352,7 +352,7 @@ com =
"rm" "rm"
(info (info
(Rm <$> rmParser <**> helper) (Rm <$> rmParser <**> helper)
( progDesc "Remove a GHC/cabal/HLS version" ( progDesc "Remove a GHC/cabal/HLS/stack version"
<> footerDoc (Just $ text rmFooter) <> footerDoc (Just $ text rmFooter)
) )
) )
@@ -452,20 +452,20 @@ com =
installToolFooter = [s|Discussion: installToolFooter = [s|Discussion:
Installs GHC or cabal. When no command is given, installs GHC Installs GHC or cabal. When no command is given, installs GHC
with the specified version/tag. with the specified version/tag.
It is recommended to always specify a subcommand (ghc/cabal/hls).|] It is recommended to always specify a subcommand (ghc/cabal/hls/stack).|]
setFooter :: String setFooter :: String
setFooter = [s|Discussion: setFooter = [s|Discussion:
Sets the currently active GHC or cabal version. When no command is given, Sets the currently active GHC or cabal version. When no command is given,
defaults to setting GHC with the specified version/tag (if no tag defaults to setting GHC with the specified version/tag (if no tag
is given, sets GHC to 'recommended' version). is given, sets GHC to 'recommended' version).
It is recommended to always specify a subcommand (ghc/cabal/hls).|] It is recommended to always specify a subcommand (ghc/cabal/hls/stack).|]
rmFooter :: String rmFooter :: String
rmFooter = [s|Discussion: rmFooter = [s|Discussion:
Remove the given GHC or cabal version. When no command is given, Remove the given GHC or cabal version. When no command is given,
defaults to removing GHC with the specified version. defaults to removing GHC with the specified version.
It is recommended to always specify a subcommand (ghc/cabal/hls).|] It is recommended to always specify a subcommand (ghc/cabal/hls/stack).|]
changeLogFooter :: String changeLogFooter :: String
changeLogFooter = [s|Discussion: changeLogFooter = [s|Discussion:
@@ -546,7 +546,7 @@ installParser =
( InstallHLS ( InstallHLS
<$> info <$> info
(installOpts (Just HLS) <**> helper) (installOpts (Just HLS) <**> helper)
( progDesc "Install haskell-languge-server" ( progDesc "Install haskell-language-server"
<> footerDoc (Just $ text installHLSFooter) <> footerDoc (Just $ text installHLSFooter)
) )
) )

View File

@@ -176,7 +176,15 @@ download_ghcup() {
_url=${base_url}/${ghver}/armv7-linux-ghcup-${ghver} _url=${base_url}/${ghver}/armv7-linux-ghcup-${ghver}
;; ;;
aarch64|arm64|armv8l) aarch64|arm64|armv8l)
_url=${base_url}/${ghver}/aarch64-linux-ghcup-${ghver} # we could be in a 32bit docker container, in which
# case uname doesn't give us what we want
if [ "$(getconf LONG_BIT)" = "32" ] ; then
_url=${base_url}/${ghver}/armv7-linux-ghcup-${ghver}
elif [ "$(getconf LONG_BIT)" = "64" ] ; then
_url=${base_url}/${ghver}/aarch64-linux-ghcup-${ghver}
else
die "Unknown long bit size: $(getconf LONG_BIT)"
fi
;; ;;
*) die "Unknown architecture: ${arch}" *) die "Unknown architecture: ${arch}"
;; ;;
@@ -293,16 +301,7 @@ ask_bashrc() {
read -r bashrc_answer </dev/tty read -r bashrc_answer </dev/tty
else else
# On windows .bashrc isn't an important user config, so we adjust it return 0
# always. On other platforms, let's be a bit more conservative.
case "${plat}" in
MSYS*|MINGW*)
return 1
;;
*)
return 0
;;
esac
fi fi
case $bashrc_answer in case $bashrc_answer in
[Pp]* | "") [Pp]* | "")