Created
September 8, 2016 20:29
-
-
Save chazcheadle/d41b1185ddafd2e0b031b4263eb062d6 to your computer and use it in GitHub Desktop.
nvm_test.sh
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/bash | |
| if command -v nvm 1&>2 >/dev/null; then | |
| if [ -f "$HOME/.nvmrc" ]; then | |
| nvm use | |
| echo -n "Using Node: `nvm current`" | |
| else | |
| echo -n "nvm installed but .nvmrc not found." | |
| fi | |
| else | |
| echo -n "nvm not installed" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment