From ef7e3cc39afe4926a453cc1dc78a0ef6fe1592bb Mon Sep 17 00:00:00 2001 From: Fraser Tweedale Date: Sun, 22 Sep 2013 14:58:19 +1000 Subject: [PATCH] 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. --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index df9ac7a..7833b93 100755 --- a/install.sh +++ b/install.sh @@ -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