From 175066780badb81d7f405395a7de69b365b632a8 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Sat, 2 May 2020 23:50:09 +0200 Subject: [PATCH] Forget about .bash_profile Previously we would prefer .bash_profile if no .bashrc exists, but that seems a bit far-fetched. .bash_profile is for login shells, .bashrc is sourced for interactive non-login shells, but most .bash_profiles also explicitly source .bashrc, so it's hard to go wrong with it. --- bootstrap-haskell | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/bootstrap-haskell b/bootstrap-haskell index 3d4c203..c928fb6 100755 --- a/bootstrap-haskell +++ b/bootstrap-haskell @@ -148,21 +148,11 @@ if [ -z "${BOOTSTRAP_HASKELL_NONINTERACTIVE}" ] ; then GHCUP_PROFILE_FILE="$HOME/.zshrc" MY_SHELL="zsh" ;; */bash) # login shell is bash - if [ -f "$HOME/.bashrc" ] ; then # bashrc is not sourced by default, so assume it isn't if file does not exist - GHCUP_PROFILE_FILE="$HOME/.bashrc" - else - GHCUP_PROFILE_FILE="$HOME/.bash_profile" - fi - + GHCUP_PROFILE_FILE="$HOME/.bashrc" MY_SHELL="bash" ;; */sh) # login shell is sh, but might be a symlink to bash or zsh if [ -n "${BASH}" ] ; then - if [ -f "$HOME/.bashrc" ] ; then # bashrc is not sourced by default, so assume it isn't if file does not exist - GHCUP_PROFILE_FILE="$HOME/.bashrc" - else - GHCUP_PROFILE_FILE="$HOME/.bash_profile" - fi - + GHCUP_PROFILE_FILE="$HOME/.bashrc" MY_SHELL="bash" elif [ -n "${ZSH_VERSION}" ] ; then GHCUP_PROFILE_FILE="$HOME/.zshrc"