Skip to content

Instantly share code, notes, and snippets.

@jeffgca
Created April 6, 2011 20:26
Show Gist options
  • Select an option

  • Save jeffgca/906450 to your computer and use it in GitHub Desktop.

Select an option

Save jeffgca/906450 to your computer and use it in GitHub Desktop.
Gets the latest node installed into ~/local.
#!/bin/bash
NODE=`which node`
if [ -z "$NODE" ]; then
echo "no node on path?"
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
fi
mkdir -p ~/local
mkdir -p ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
# cleanup
make install && cd ../ && rm -fr ~/node-latest-install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment