install.sh: use a more generic SOURCE_STR

SOURCE_STR currently includes the value of $HOME (at install time).
Change SOURCE_STR to include a literal "$HOME" (to be expanded at
profile runtime) so that sourcing nvm will work if the user changes
their username, shares their profile, et cetera.

Also use the more portable single-square-bracket test.
master
Fraser Tweedale 2013-09-22 14:58:19 +10:00
parent e6116d96ab
commit ef7e3cc39a
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ else
fi
fi
SOURCE_STR="[[ -s "$NVM_DIR/nvm.sh" ]] && . "$NVM_DIR/nvm.sh" # This loads NVM"
SOURCE_STR="[ -s \$HOME/.nvm/nvm.sh ] && . \$HOME/.nvm/nvm.sh # This loads NVM"
if [ -z "$PROFILE" ] || [ ! -f "$PROFILE" ] ; then
if [ -z $PROFILE ]; then