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
;;
"sync" )
LATEST=`version latest`
STABLE=`version stable`
(cd $NVM_DIR
rm -f v* 2>/dev/null
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.*//'`
do touch $VER
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.*//'`; do
touch $VER
done
echo " done."
)
[ "$STABLE" = `version stable` ] || echo "NEW stable: `version stable`"
[ "$LATEST" = `version latest` ] || echo "NEW latest: `version latest`"
;;
"clear-cache" )
rm -f $NVM_DIR/v*