Created
August 17, 2015 01:42
-
-
Save jbenner-radham/920e5de939809ef54e75 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
INSTALLED=$(npm -v) | |
LATEST=$(npm view npm dist-tags.latest) | |
if [[ $INSTALLED = $LATEST ]]; then | |
echo "npm is up to date. version: ${INSTALLED}" | |
else | |
echo "npm version installed: ${INSTALLED}; latest: ${LATEST}" | |
npm -g install npm@latest | |
npm -g cache clean | |
fi | |
npm -g update |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment