Also modify .bash_profile on mac
This commit is contained in:
parent
8be2a8eed7
commit
3e429945dc
@ -238,7 +238,20 @@ if [ -z "${BOOTSTRAP_HASKELL_NONINTERACTIVE}" ] ; then
|
|||||||
echo "test -f $GHCUP_DIR/env ; and set -gx PATH \$HOME/.cabal/bin $GHCUP_BIN \$PATH" >> "${GHCUP_PROFILE_FILE}"
|
echo "test -f $GHCUP_DIR/env ; and set -gx PATH \$HOME/.cabal/bin $GHCUP_BIN \$PATH" >> "${GHCUP_PROFILE_FILE}"
|
||||||
fi
|
fi
|
||||||
break ;;
|
break ;;
|
||||||
*)
|
bash)
|
||||||
|
if ! grep -q "ghcup-env" "${GHCUP_PROFILE_FILE}" ; then
|
||||||
|
echo "[ -f \"${GHCUP_DIR}/env\" ] && source \"${GHCUP_DIR}/env\" # ghcup-env" >> "${GHCUP_PROFILE_FILE}"
|
||||||
|
fi
|
||||||
|
case "$(uname -s)" in
|
||||||
|
"Darwin"|"darwin")
|
||||||
|
if ! grep -q "ghcup-env" "${HOME}/.bash_profile" ; then
|
||||||
|
echo "[[ -f ~/.bashrc ]] && source ~/.bashrc # ghcup-env" >> "${HOME}/.bash_profile"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
break ;;
|
||||||
|
|
||||||
|
zsh)
|
||||||
if ! grep -q "ghcup-env" "${GHCUP_PROFILE_FILE}" ; then
|
if ! grep -q "ghcup-env" "${GHCUP_PROFILE_FILE}" ; then
|
||||||
echo "[ -f \"${GHCUP_DIR}/env\" ] && source \"${GHCUP_DIR}/env\" # ghcup-env" >> "${GHCUP_PROFILE_FILE}"
|
echo "[ -f \"${GHCUP_DIR}/env\" ] && source \"${GHCUP_DIR}/env\" # ghcup-env" >> "${GHCUP_PROFILE_FILE}"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user