Skip to content

Instantly share code, notes, and snippets.

@rkmax
Last active October 1, 2019 15:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rkmax/8bdf0f040c88ee66d13cb13b7b298306 to your computer and use it in GitHub Desktop.
Save rkmax/8bdf0f040c88ee66d13cb13b7b298306 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
sudo apt-get update
sudo apt-get install -y build-essential libssl-dev
function latest_version() {
curl -sL https://api.github.com/repos/creationix/nvm/releases/latest \
| grep 'tag_name' \
| cut -d '"' -f 4
}
function install_version() {
curl -L "https://raw.githubusercontent.com/creationix/nvm/${1}/install.sh" \
| bash
}
install_version `latest_version`
## Agrega a tu ~/.profile o ~/.bashrc o ~/.zshrc
export NVM_DIR="$HOME/.nvm"
export PYTHON=python2
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment