|
|
@ -54,7 +54,7 @@ wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | |
|
|
|
|
|
|
|
|
|
|
|
```sh |
|
|
|
```sh |
|
|
|
export NVM_DIR="$HOME/.nvm" |
|
|
|
export NVM_DIR="$HOME/.nvm" |
|
|
|
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm |
|
|
|
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm |
|
|
|
``` |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
You can customize the install source, directory, profile, and version using the `NVM_SOURCE`, `NVM_DIR`, `PROFILE`, and `NODE_VERSION` variables. |
|
|
|
You can customize the install source, directory, profile, and version using the `NVM_SOURCE`, `NVM_DIR`, `PROFILE`, and `NODE_VERSION` variables. |
|
|
@ -148,7 +148,7 @@ export NVM_DIR="$HOME/.nvm" && ( |
|
|
|
git clone https://github.com/creationix/nvm.git "$NVM_DIR" |
|
|
|
git clone https://github.com/creationix/nvm.git "$NVM_DIR" |
|
|
|
cd "$NVM_DIR" |
|
|
|
cd "$NVM_DIR" |
|
|
|
git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" origin` |
|
|
|
git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" origin` |
|
|
|
) && . "$NVM_DIR/nvm.sh" |
|
|
|
) && \. "$NVM_DIR/nvm.sh" |
|
|
|
``` |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
Now add these lines to your `~/.bashrc`, `~/.profile`, or `~/.zshrc` file to have it automatically sourced upon login: |
|
|
|
Now add these lines to your `~/.bashrc`, `~/.profile`, or `~/.zshrc` file to have it automatically sourced upon login: |
|
|
@ -156,7 +156,7 @@ Now add these lines to your `~/.bashrc`, `~/.profile`, or `~/.zshrc` file to hav |
|
|
|
|
|
|
|
|
|
|
|
```sh |
|
|
|
```sh |
|
|
|
export NVM_DIR="$HOME/.nvm" |
|
|
|
export NVM_DIR="$HOME/.nvm" |
|
|
|
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm |
|
|
|
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm |
|
|
|
``` |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
### Manual upgrade |
|
|
|
### Manual upgrade |
|
|
@ -173,7 +173,7 @@ For manual upgrade with `git` (requires git v1.7.10+): |
|
|
|
cd "$NVM_DIR" |
|
|
|
cd "$NVM_DIR" |
|
|
|
git fetch origin |
|
|
|
git fetch origin |
|
|
|
git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" origin` |
|
|
|
git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" origin` |
|
|
|
) && . "$NVM_DIR/nvm.sh" |
|
|
|
) && \. "$NVM_DIR/nvm.sh" |
|
|
|
``` |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
## Usage |
|
|
|
## Usage |
|
|
@ -426,7 +426,7 @@ Nota bene: Avoid running nvm while the tests are running. |
|
|
|
To activate, you need to source `bash_completion`: |
|
|
|
To activate, you need to source `bash_completion`: |
|
|
|
|
|
|
|
|
|
|
|
```sh |
|
|
|
```sh |
|
|
|
[[ -r $NVM_DIR/bash_completion ]] && . $NVM_DIR/bash_completion |
|
|
|
[[ -r $NVM_DIR/bash_completion ]] && \. $NVM_DIR/bash_completion |
|
|
|
``` |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
Put the above sourcing line just below the sourcing line for nvm in your profile (`.bashrc`, `.bash_profile`). |
|
|
|
Put the above sourcing line just below the sourcing line for nvm in your profile (`.bashrc`, `.bash_profile`). |
|
|
|