From 942685f396b1373c2b87dc9132b94d28bf1b11f3 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Fri, 2 Feb 2024 15:40:17 +0800 Subject: [PATCH] Also dump env into ~/.profile, fixes #763 --- scripts/bootstrap/bootstrap-haskell | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/bootstrap/bootstrap-haskell b/scripts/bootstrap/bootstrap-haskell index 54fb229..73ef192 100755 --- a/scripts/bootstrap/bootstrap-haskell +++ b/scripts/bootstrap/bootstrap-haskell @@ -561,6 +561,10 @@ adjust_bashrc() { printf "\n%s" "[ -f \"${GHCUP_DIR}/env\" ] && source \"${GHCUP_DIR}/env\" # ghcup-env" >> "${GHCUP_PROFILE_FILE}" ;; esac + if [ -e "$HOME/.profile" ] ; then + sed -i -e '/# ghcup-env$/d' "$(posix_realpath "$HOME/.profile")" + printf "\n%s" "[ -f \"${GHCUP_DIR}/env\" ] && source \"${GHCUP_DIR}/env\" # ghcup-env" >> "$HOME/.profile" + fi echo echo "===============================================================================" echo