Skip to content

Instantly share code, notes, and snippets.

@rtreffer
Created March 2, 2011 21:42
Show Gist options
  • Save rtreffer/851798 to your computer and use it in GitHub Desktop.
Save rtreffer/851798 to your computer and use it in GitHub Desktop.
install / update nodejs
# 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