* NVM_TARGET renamed to NVM_DIR (this will ensure that any locally
* existing nvm copy will be picked up and updated)master
parent
5c6af59fcd
commit
c5437bb222
14
install.sh
14
install.sh
|
@ -1,16 +1,16 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
NVM_TARGET="$HOME/.nvm"
|
NVM_DIR="$HOME/.nvm"
|
||||||
|
|
||||||
if [ -d "$NVM_TARGET" ]; then
|
if [ -d "$NVM_DIR" ]; then
|
||||||
echo "=> NVM is already installed in $NVM_TARGET, trying to update"
|
echo "=> NVM is already installed in $NVM_DIR, trying to update"
|
||||||
echo -ne "\r=> "
|
echo -ne "\r=> "
|
||||||
cd $NVM_TARGET && git pull
|
cd $NVM_DIR && git pull
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Cloning to $NVM_TARGET
|
# Cloning to $NVM_DIR
|
||||||
git clone https://github.com/creationix/nvm.git $NVM_TARGET
|
git clone https://github.com/creationix/nvm.git $NVM_DIR
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ else
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
SOURCE_STR="[[ -s "$NVM_TARGET/nvm.sh" ]] && . "$NVM_TARGET/nvm.sh" # This loads NVM"
|
SOURCE_STR="[[ -s "$NVM_DIR/nvm.sh" ]] && . "$NVM_DIR/nvm.sh" # This loads NVM"
|
||||||
|
|
||||||
if [ -z "$PROFILE" ] || [ ! -f "$PROFILE" ] ; then
|
if [ -z "$PROFILE" ] || [ ! -f "$PROFILE" ] ; then
|
||||||
if [ -z $PROFILE ]; then
|
if [ -z $PROFILE ]; then
|
||||||
|
|
Loading…
Reference in New Issue