From a7108e98f254cebc2f153de4ab9e41c758e769c8 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 4 Sep 2014 00:54:50 -0700 Subject: [PATCH] Make .bashrc be checked first on install. From #511. Closes #320. Closes #268. Closes #334. Fixes #497. Relates to --- install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 4856cbe..78a2316 100755 --- a/install.sh +++ b/install.sh @@ -96,12 +96,12 @@ echo # Detect profile file if not specified as environment variable (eg: PROFILE=~/.myprofile). if [ -z "$PROFILE" ]; then - if [ -f "$HOME/.bash_profile" ]; then + if [ -f "$HOME/.bashrc" ]; then + PROFILE="$HOME/.bashrc" + elif [ -f "$HOME/.bash_profile" ]; then PROFILE="$HOME/.bash_profile" elif [ -f "$HOME/.zshrc" ]; then PROFILE="$HOME/.zshrc" - elif [ -f "$HOME/.bashrc" ]; then - PROFILE="$HOME/.bashrc" elif [ -f "$HOME/.profile" ]; then PROFILE="$HOME/.profile" fi @@ -111,7 +111,7 @@ SOURCE_STR="\nexport NVM_DIR=\"$NVM_DIR\"\n[ -s \"\$NVM_DIR/nvm.sh\" ] && . \"\$ if [ -z "$PROFILE" ] || [ ! -f "$PROFILE" ] ; then if [ -z "$PROFILE" ]; then - echo "=> Profile not found. Tried ~/.bash_profile, ~/bashrc, ~/.zshrc, and ~/.profile." + echo "=> Profile not found. Tried ~/.bashrc, ~/.bash_profile, ~/.zshrc, and ~/.profile." echo "=> Create one of them and run this script again" else echo "=> Profile $PROFILE not found"