Created
October 14, 2012 10:49
-
-
Save constantology/3888238 to your computer and use it in GitHub Desktop.
shell script to update node to a specific version
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
#!/bin/sh | |
# add these two variables to your: ~/.bash_profile or ~/.bashrc or just hardcode the directories in place of the variables below | |
# export NODE_REPO=/usr/local/Library/node/repo | |
# export NODE_JS=/usr/local/Library/node/js | |
# example of upgrading to version 0.8.12 | |
# $ sh node.update.sh v0.8.12 | |
cd $NODE_REPO; | |
git pull; | |
git checkout $1; | |
./configure --prefix=$NODE_JS; | |
make; | |
make install; | |
node -v; | |
npm -v; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment