Add output to sync if stable/latest changes

master
Isaac Wolkerstorfer 2011-01-22 19:31:20 +01:00
parent 861766372d
commit a7328b3711
1 changed files with 7 additions and 3 deletions

10
nvm.sh
View File

@ -185,14 +185,18 @@ nvm()
fi fi
;; ;;
"sync" ) "sync" )
LATEST=`version latest`
STABLE=`version stable`
(cd $NVM_DIR (cd $NVM_DIR
rm -f v* 2>/dev/null rm -f v* 2>/dev/null
echo -n "Syncing with nodejs.org..." echo -n "# syncing with nodejs.org..."
for VER in `curl -s http://nodejs.org/dist/ | grep 'node-v.*\.tar\.gz' | sed -e 's/.*node-//' -e 's/\.tar\.gz.*//'` for VER in `curl -s http://nodejs.org/dist/ | grep 'node-v.*\.tar\.gz' | sed -e 's/.*node-//' -e 's/\.tar\.gz.*//'`; do
do touch $VER touch $VER
done done
echo " done." echo " done."
) )
[ "$STABLE" = `version stable` ] || echo "NEW stable: `version stable`"
[ "$LATEST" = `version latest` ] || echo "NEW latest: `version latest`"
;; ;;
"clear-cache" ) "clear-cache" )
rm -f $NVM_DIR/v* rm -f $NVM_DIR/v*