Created
February 18, 2022 16:54
-
-
Save raisiqueira/8798912ec6ae88f70115ec880dfec8be to your computer and use it in GitHub Desktop.
Script to install a NodeJS version from a .nvmrc file
This file contains hidden or 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/sh | |
NODE_VER="$(cat .nvmrc)" | |
if [[ -f "${HOME}/.nvm/nvm.sh" ]]; then | |
# Normal *nix | |
source "${HOME}/.nvm/nvm.sh" | |
fi | |
nvm install "$NODE_VER" | |
nvm use "$NODE_VER" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment