Created
March 2, 2011 21:42
-
-
Save rtreffer/851798 to your computer and use it in GitHub Desktop.
install / update nodejs
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
# cat node.sh | |
#!/bin/bash | |
[ -d 'node' ] || git clone git://github.com/joyent/node.git node || exit 1 | |
( | |
cd node || exit 1 | |
git pull | |
git reset --hard | |
git checkout -- . | |
git clean -- . | |
./configure --prefix=/usr/local/ | |
CPU_COUNT=$(($(grep processor /proc/cpuinfo |sed 's/.*://'|tail -n1) + 1)) | |
JOBS=$(( $CPU_COUNT + $CPU_COUNT / 3 )) | |
make -j$JOBS && \ | |
make install | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment