Merge remote-tracking branch 'origin/merge-requests/125'
This commit is contained in:
commit
c72fac8d17
@ -100,14 +100,28 @@ if [ -z "${BOOTSTRAP_HASKELL_NONINTERACTIVE}" ] ; then
|
|||||||
GHCUP_PROFILE_FILE="$HOME/.bashrc"
|
GHCUP_PROFILE_FILE="$HOME/.bashrc"
|
||||||
elif [ -f "$HOME/.bash_profile" ] ; then
|
elif [ -f "$HOME/.bash_profile" ] ; then
|
||||||
GHCUP_PROFILE_FILE="$HOME/.bash_profile"
|
GHCUP_PROFILE_FILE="$HOME/.bash_profile"
|
||||||
|
else
|
||||||
|
# most complaints we get are from mac users who
|
||||||
|
# need assistance of setting up their shell, so suggest
|
||||||
|
# to create .bash_profile, which is a good guess
|
||||||
|
GHCUP_PROFILE_FILE="$HOME/.bash_profile"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${GHCUP_PROFILE_FILE}" ] && [ -f "${GHCUP_PROFILE_FILE}" ] ; then
|
if [ -f "${GHCUP_PROFILE_FILE}" ] ; then
|
||||||
printf "\\033[0;35m%s\\033[0m\\n" ""
|
printf "\\033[0;35m%s\\033[0m\\n" ""
|
||||||
printf "\\033[0;35m%s\\033[0m\\n" "Detected \"${GHCUP_PROFILE_FILE}\" on your system..."
|
printf "\\033[0;35m%s\\033[0m\\n" "Detected \"${GHCUP_PROFILE_FILE}\" on your system..."
|
||||||
printf "\\033[0;35m%s\\033[0m\\n" "If you want ghcup to automatically fix your \"${GHCUP_PROFILE_FILE}\" to include the required PATH variable"
|
printf "\\033[0;35m%s\\033[0m\\n" "If you want ghcup to automatically fix your \"${GHCUP_PROFILE_FILE}\" to include the required PATH variable"
|
||||||
printf "\\033[0;35m%s\\033[0m\\n" "answer with YES, otherwise with NO and press ENTER."
|
printf "\\033[0;35m%s\\033[0m\\n" "answer with YES, otherwise with NO and press ENTER."
|
||||||
printf "\\033[0;35m%s\\033[0m\\n" ""
|
printf "\\033[0;35m%s\\033[0m\\n" ""
|
||||||
|
elif [ -n "${BASH}" ] ; then # only suggest to create .bash_profile if we are in a bash shell
|
||||||
|
printf "\\033[0;35m%s\\033[0m\\n" ""
|
||||||
|
printf "\\033[0;35m%s\\033[0m\\n" "Detected bash shell on your system..."
|
||||||
|
printf "\\033[0;35m%s\\033[0m\\n" "If you want ghcup to automatically create \"${GHCUP_PROFILE_FILE}\" and include the required PATH variable"
|
||||||
|
printf "\\033[0;35m%s\\033[0m\\n" "answer with YES, otherwise with NO and press ENTER."
|
||||||
|
printf "\\033[0;35m%s\\033[0m\\n" ""
|
||||||
|
else
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
read -r next_answer </dev/tty
|
read -r next_answer </dev/tty
|
||||||
@ -123,7 +137,6 @@ if [ -z "${BOOTSTRAP_HASKELL_NONINTERACTIVE}" ] ; then
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# vim: tabstop=4 shiftwidth=4 expandtab
|
# vim: tabstop=4 shiftwidth=4 expandtab
|
||||||
|
Loading…
Reference in New Issue
Block a user