From 90dc1f6cf8b6864dd2977577e28192aabd8e45a4 Mon Sep 17 00:00:00 2001 From: Tom Robinson Date: Wed, 18 Nov 2009 01:34:01 -0800 Subject: [PATCH] Reorder shell config file checks. --- bootstrap.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index 6879c29fe..3d52fa98d 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -84,14 +84,15 @@ export PATH="$ORIGINAL_PATH" if ! which "narwhal"; then SHELL_CONFIG="" - if [ -f "$HOME/.profile" ]; then - SHELL_CONFIG="$HOME/.profile" - elif [ -f "$HOME/.bashrc" ]; then - SHELL_CONFIG="$HOME/.bashrc" - elif [ -f "$HOME/.bash_profile" ]; then + # use order outlined by http://hayne.net/MacDev/Notes/unixFAQ.html#shellStartup + if [ -f "$HOME/.bash_profile" ]; then SHELL_CONFIG="$HOME/.bash_profile" elif [ -f "$HOME/.bash_login" ]; then SHELL_CONFIG="$HOME/.bash_login" + elif [ -f "$HOME/.profile" ]; then + SHELL_CONFIG="$HOME/.profile" + elif [ -f "$HOME/.bashrc" ]; then + SHELL_CONFIG="$HOME/.bashrc" fi EXPORT_PATH_STRING="export PATH=\"$INSTALL_DIRECTORY/bin:\$PATH\""