Created
October 16, 2015 01:17
-
-
Save franklinjavier/bdc2e1f12db42e285dfb to your computer and use it in GitHub Desktop.
Install nvm, node stable and npm
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
#!/usr/bin/env bash | |
set -e | |
echo "Installing nvm..." | |
[ -d ~/.nvm ] && rm -rf ~/.nvm | |
git clone https://github.com/creationix/nvm.git ~/.nvm | |
cd ~/.nvm | |
git checkout `git describe --abbrev=0 --tags` | |
cd - >/dev/null | |
echo "...done" || echo "...failed" >&2 | |
echo "Sourcing nvm..." | |
source ~/.nvm/nvm.sh | |
echo "...done" || echo "...failed" >&2 | |
echo "Installing node stable..." | |
nvm install stable | |
nvm alias default stable | |
echo "...done" || echo "...failed" >&2 | |
echo "Installing npm..." | |
npm install -g npm | |
echo "...done" || echo "...failed" >&2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment