Merge pull request #327 from stuartf/issue-314

fix copy-packages
master
Jordan Harband 2013-12-13 15:37:28 -08:00
commit 8573b95a2d
1 changed files with 4 additions and 3 deletions

7
nvm.sh
View File

@ -484,9 +484,10 @@ nvm() {
nvm help nvm help
return return
fi fi
VERSION=`nvm_version $2` local VERSION=`nvm_version $2`
ROOT=`nvm use $VERSION && npm -g root` local ROOT=`nvm use $VERSION && npm -g root`
INSTALLS=`nvm use $VERSION > /dev/null && npm -g -p ll | \grep "$ROOT\/[^/]\+$" | cut -d '/' -f 8 | cut -d ":" -f 2 | \grep -v npm | tr "\n" " "` local ROOTDEPTH=$((`echo $ROOT | sed 's/[^\/]//g'|wc -m` -1))
local INSTALLS=`nvm use $VERSION > /dev/null && npm -g -p ll | \grep "$ROOT\/[^/]\+$" | cut -d '/' -f $(($ROOTDEPTH + 2)) | cut -d ":" -f 2 | \grep -v npm | tr "\n" " "`
npm install -g $INSTALLS npm install -g $INSTALLS
;; ;;
"clear-cache" ) "clear-cache" )