-
-
Save burkeholland/7045bc14bd9ce9cabefd74360d521524 to your computer and use it in GitHub Desktop.
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 | |
nvm_install_script=https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | |
NVM_DIR="$HOME/.nvm" | |
NVM_NODE_VERSION=14 | |
if [ ! -d "$HOME/.nvm" ]; then | |
echo "> Downloading NVM..." | |
curl -s -o- $nvm_install_script | bash >/dev/null 2>&1 | |
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
nvm install --lts | |
fi | |
echo >&2 "> Node.js $(node --version) is ready to use." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment