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"