Skip to content

Instantly share code, notes, and snippets.

@layerssss
Last active December 14, 2015 15:08
Show Gist options
  • Save layerssss/5105454 to your computer and use it in GitHub Desktop.
Save layerssss/5105454 to your computer and use it in GitHub Desktop.
for pity ubuntu users....
#!/usr/bin/env sh
# install nodejs on linux x64.
# usage:
# curl 'https://gist.github.com/layerssss/5105454/raw/install_nodejs_linux_x64.sh' | sudo bash
NODE=`curl http://nodejs.org/dist/latest/ | perl -ne 'while(/\"(node[^\"]*linux-x64).tar.gz"/g){print "$1\n";}'`
echo Installing $NODE ...
curl http://nodejs.org/dist/latest/$NODE.tar.gz -o ./node.tar.gz
tar xvzf node.tar.gz
cp -R $NODE/bin /usr/local/
cp -R $NODE/include /usr/local/
cp -R $NODE/lib /usr/local/
cp -R $NODE/share /usr/local/
rm -R $NODE
rm node.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment