Skip to content

Instantly share code, notes, and snippets.

@steelcowboy
Created August 8, 2020 23:58
Show Gist options
  • Save steelcowboy/451d45ae6a1728dba7678ce2e68dbcc4 to your computer and use it in GitHub Desktop.
Save steelcowboy/451d45ae6a1728dba7678ce2e68dbcc4 to your computer and use it in GitHub Desktop.
Demo nvm install in bash
testuser@a8086b20287e:~$ echo $SHELL
/bin/bash
testuser@a8086b20287e:~$ ls -a
. .. .bash_logout .bashrc .mkshrc .profile install.sh
testuser@a8086b20287e:~$ ./install.sh
=> Downloading nvm from git to '/home/testuser/.nvm'
=> Cloning into '/home/testuser/.nvm'...
remote: Enumerating objects: 290, done.
remote: Counting objects: 100% (290/290), done.
remote: Compressing objects: 100% (257/257), done.
remote: Total 290 (delta 35), reused 97 (delta 20), pack-reused 0
Receiving objects: 100% (290/290), 163.27 KiB | 5.27 MiB/s, done.
Resolving deltas: 100% (35/35), done.
=> Compressing and cleaning up git repository
=> Appending nvm source string to /home/testuser/.bashrc
=> Appending bash_completion source string to /home/testuser/.bashrc
=> Close and reopen your terminal to start using nvm or run the following to use it now:
export NVM_DIR="$HOME/.nvm"
[ -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