|
|
@ -96,12 +96,12 @@ echo |
|
|
|
|
|
|
|
|
|
|
|
# Detect profile file if not specified as environment variable (eg: PROFILE=~/.myprofile). |
|
|
|
# Detect profile file if not specified as environment variable (eg: PROFILE=~/.myprofile). |
|
|
|
if [ -z "$PROFILE" ]; then |
|
|
|
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" |
|
|
|
PROFILE="$HOME/.bash_profile" |
|
|
|
elif [ -f "$HOME/.zshrc" ]; then |
|
|
|
elif [ -f "$HOME/.zshrc" ]; then |
|
|
|
PROFILE="$HOME/.zshrc" |
|
|
|
PROFILE="$HOME/.zshrc" |
|
|
|
elif [ -f "$HOME/.bashrc" ]; then |
|
|
|
|
|
|
|
PROFILE="$HOME/.bashrc" |
|
|
|
|
|
|
|
elif [ -f "$HOME/.profile" ]; then |
|
|
|
elif [ -f "$HOME/.profile" ]; then |
|
|
|
PROFILE="$HOME/.profile" |
|
|
|
PROFILE="$HOME/.profile" |
|
|
|
fi |
|
|
|
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" ] || [ ! -f "$PROFILE" ] ; then |
|
|
|
if [ -z "$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" |
|
|
|
echo "=> Create one of them and run this script again" |
|
|
|
else |
|
|
|
else |
|
|
|
echo "=> Profile $PROFILE not found" |
|
|
|
echo "=> Profile $PROFILE not found" |
|
|
|