Created
April 2, 2015 13:48
-
-
Save chorrell/f14d6141ad903a03af79 to your computer and use it in GitHub Desktop.
Test install npm 2.7.4 with node 0.8.28
This file contains 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
#!/bin/bash | |
set -o xtrace | |
export npm_config_loglevel=verbose | |
export npm_config_spin=false | |
NODE_VERSION=0.8.28 | |
NPM_VERSION=2.7.4 | |
# Install node | |
gpg --keyserver pool.sks-keyservers.net --recv-keys 7937DFD2AB06298B2293C3187D33FF9D0246406D 114F43EE0176B71C7BC219DD50A3051F888C628D | |
curl -SLO "http://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz" | |
curl -SLO "http://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" | |
gpg --verify SHASUMS256.txt.asc | |
grep " node-v$NODE_VERSION-linux-x64.tar.gz\$" SHASUMS256.txt.asc | sha256sum -c - | |
tar -xzf "node-v$NODE_VERSION-linux-x64.tar.gz" -C /usr/local --strip-components=1 | |
rm "node-v$NODE_VERSION-linux-x64.tar.gz" SHASUMS256.txt.asc | |
node -v | |
# Install npm | |
npm install -g [email protected] | |
npm install -g npm@${NPM_VERSION} | |
npm cache clear | |
npm -v | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment