Create alias dir on demand

master
Isaac Wolkerstorfer 2011-01-25 17:12:13 +01:00
parent 3d0082fa60
commit 8ec6fb22fd
1 changed files with 2 additions and 1 deletions

3
nvm.sh
View File

@ -173,8 +173,9 @@ nvm()
echo "# use 'nvm sync' to update from nodejs.org"
;;
"alias" )
mkdir -p $NVM_DIR/alias
if [ $# -le 2 ]; then
(cd $NVM_DIR/alias; for ALIAS in `ls $2* 2>/dev/null`; do
(cd $NVM_DIR/alias && for ALIAS in `ls $2* 2>/dev/null`; do
DEST=`cat $ALIAS`
VERSION=`nvm_version $DEST`
if [ "$DEST" = "$VERSION" ]; then