Merge branch 'issue-958'
This commit is contained in:
commit
55030d83da
@ -35,7 +35,7 @@ export GHCUP_SKIP_UPDATE_CHECK=yes
|
||||
: "${BOOTSTRAP_HASKELL_DOWNLOADER:=curl}"
|
||||
|
||||
case "${plat}" in
|
||||
MSYS*|MINGW*)
|
||||
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")
|
||||
@ -72,7 +72,7 @@ warn() {
|
||||
printf "%s\\n" "$1"
|
||||
else
|
||||
case "${plat}" in
|
||||
MSYS*|MINGW*)
|
||||
MSYS*|MINGW*|CYGWIN*)
|
||||
# shellcheck disable=SC3037
|
||||
echo -e "\\033[0;35m$1\\033[0m"
|
||||
;;
|
||||
@ -88,7 +88,7 @@ yellow() {
|
||||
printf "%s\\n" "$1"
|
||||
else
|
||||
case "${plat}" in
|
||||
MSYS*|MINGW*)
|
||||
MSYS*|MINGW*|CYGWIN*)
|
||||
# shellcheck disable=SC3037
|
||||
echo -e "\\033[0;33m$1\\033[0m"
|
||||
;;
|
||||
@ -104,7 +104,7 @@ green() {
|
||||
printf "%s\\n" "$1"
|
||||
else
|
||||
case "${plat}" in
|
||||
MSYS*|MINGW*)
|
||||
MSYS*|MINGW*|CYGWIN*)
|
||||
# shellcheck disable=SC3037
|
||||
echo -e "\\033[0;32m$1\\033[0m"
|
||||
;;
|
||||
@ -160,7 +160,7 @@ _done() {
|
||||
echo
|
||||
echo "==============================================================================="
|
||||
case "${plat}" in
|
||||
MSYS*|MINGW*)
|
||||
MSYS*|MINGW*|CYGWIN*)
|
||||
green
|
||||
green "All done!"
|
||||
green
|
||||
@ -313,7 +313,7 @@ download_ghcup() {
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
MSYS*|MINGW*)
|
||||
MSYS*|MINGW*|CYGWIN*)
|
||||
case "${arch}" in
|
||||
x86_64|amd64)
|
||||
_url=${GHCUP_BASE_URL}/${ghver}/x86_64-mingw64-ghcup-${ghver}.exe
|
||||
@ -326,7 +326,7 @@ download_ghcup() {
|
||||
;;
|
||||
esac
|
||||
case "${plat}" in
|
||||
MSYS*|MINGW*)
|
||||
MSYS*|MINGW*|CYGWIN*)
|
||||
case "${BOOTSTRAP_HASKELL_DOWNLOADER}" in
|
||||
"curl")
|
||||
# shellcheck disable=SC2086
|
||||
@ -545,7 +545,7 @@ adjust_bashrc() {
|
||||
printf "\n%s" "[[ -f ~/.bashrc ]] && source ~/.bashrc # ghcup-env" >> "${HOME}/.bash_profile"
|
||||
fi
|
||||
;;
|
||||
MSYS*|MINGW*)
|
||||
MSYS*|MINGW*|CYGWIN*)
|
||||
if [ ! -e "${HOME}/.bash_profile" ] ; then
|
||||
echo '# generated by ghcup' > "${HOME}/.bash_profile"
|
||||
echo 'test -f ~/.profile && . ~/.profile' >> "${HOME}/.bash_profile"
|
||||
@ -595,7 +595,7 @@ adjust_cabal_config() {
|
||||
|
||||
ask_cabal_config_init() {
|
||||
case "${plat}" in
|
||||
MSYS*|MINGW*)
|
||||
MSYS*|MINGW*|CYGWIN*)
|
||||
if [ -n "${BOOTSTRAP_HASKELL_ADJUST_CABAL_CONFIG}" ] ; then
|
||||
return 1
|
||||
fi
|
||||
@ -636,7 +636,7 @@ ask_cabal_config_init() {
|
||||
|
||||
do_cabal_config_init() {
|
||||
case "${plat}" in
|
||||
MSYS*|MINGW*)
|
||||
MSYS*|MINGW*|CYGWIN*)
|
||||
case $1 in
|
||||
1)
|
||||
adjust_cabal_config
|
||||
@ -756,7 +756,7 @@ if [ -z "${GHCUP_USE_XDG_DIRS}" ] ; then
|
||||
echo "ghcup installs only into the following directory,"
|
||||
echo "which can be removed anytime:"
|
||||
case "${plat}" in
|
||||
MSYS*|MINGW*)
|
||||
MSYS*|MINGW*|CYGWIN*)
|
||||
echo " $(cygpath -w "$GHCUP_DIR")"
|
||||
;;
|
||||
*)
|
||||
@ -823,7 +823,7 @@ if [ -z "${BOOTSTRAP_HASKELL_MINIMAL}" ] ; then
|
||||
edo cabal update --ignore-project
|
||||
else # don't install ghc and cabal
|
||||
case "${plat}" in
|
||||
MSYS*|MINGW*)
|
||||
MSYS*|MINGW*|CYGWIN*)
|
||||
# need to bootstrap cabal to initialize config on windows
|
||||
# we'll remove it afterwards
|
||||
tmp_dir="$(mktemp -d)"
|
||||
|
Loading…
Reference in New Issue
Block a user