Created
September 14, 2011 10:30
-
-
Save outbounder/1216273 to your computer and use it in GitHub Desktop.
auto-install nvm, node.js
This file contains 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/bash | |
NODE="v0.4.11" | |
NVMDIR=~/.nvm | |
NVM=~/.nvm/nvm.sh | |
echo "installing projectman-repl" | |
hash nvm 2>&- || { | |
echo "couldn't find nvm, sourcing from $NVM" | |
test -e $NVM || { | |
echo "couldn't find $NVM -> installing..." | |
hash git 2>&- || { | |
echo "couldn't find git -> installing..." | |
sudo apt-get -y install git-core | |
} | |
git clone git://github.com/creationix/nvm.git $NVMDIR | |
} | |
. $NVM | |
} | |
test -e $NVMDIR/$NODE || { | |
echo "cound't find $NVMDIR/$NODE -> installing..." | |
sudo apt-get -y install g++ curl libssl-dev apache2-utils | |
nvm install $NODE | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment