From 9589137d184f230521bbefdd4423bcefc9732ab3 Mon Sep 17 00:00:00 2001 From: wiserweb Date: Sun, 24 Jul 2016 16:02:30 -0400 Subject: [PATCH 1/3] Improve clarity of readme Include lines that the script will attempt to add to the profile files. Helps users diagnose which lines to expect to see in their profile files if they are having difficulty getting 'nvm' to work at the command line. --- README.markdown | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index 7e316fc..7a9d440 100644 --- a/README.markdown +++ b/README.markdown @@ -46,7 +46,14 @@ or Wget: wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.31.3/install.sh | bash ``` -The script clones the nvm repository to `~/.nvm` and adds the source line to your profile (`~/.bash_profile`, `~/.zshrc`, `~/.profile`, or `~/.bashrc`). +The script clones the nvm repository to `~/.nvm` and adds the following source lines to your profile (`~/.bash_profile`, `~/.zshrc`, `~/.profile`, or `~/.bashrc`). + +``` +export NVM_DIR="/home/user/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm +``` + +Where 'user' in the above NVM_DIR exported path is substituted for the current logged in user. You can customize the install source, directory, profile, and version using the `NVM_SOURCE`, `NVM_DIR`, `PROFILE`, and `NODE_VERSION` variables. Eg: `curl ... | NVM_DIR=/usr/local/nvm bash` for a global install. From 9176a3f3ed2e5135923858cc038a42185f6d2ec7 Mon Sep 17 00:00:00 2001 From: wiserweb Date: Sun, 24 Jul 2016 20:00:34 -0400 Subject: [PATCH 2/3] Update README.markdown replace /home/user/ with $HOME --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index 7a9d440..1dec381 100644 --- a/README.markdown +++ b/README.markdown @@ -49,7 +49,7 @@ wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.31.3/install.sh | The script clones the nvm repository to `~/.nvm` and adds the following source lines to your profile (`~/.bash_profile`, `~/.zshrc`, `~/.profile`, or `~/.bashrc`). ``` -export NVM_DIR="/home/user/.nvm" +export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm ``` From b9d709c2250a8bb7388bf53e2117ca6260521773 Mon Sep 17 00:00:00 2001 From: wiserweb Date: Mon, 25 Jul 2016 20:51:32 -0400 Subject: [PATCH 3/3] Update README.markdown --- README.markdown | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.markdown b/README.markdown index 1dec381..7477aed 100644 --- a/README.markdown +++ b/README.markdown @@ -53,8 +53,6 @@ export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm ``` -Where 'user' in the above NVM_DIR exported path is substituted for the current logged in user. - You can customize the install source, directory, profile, and version using the `NVM_SOURCE`, `NVM_DIR`, `PROFILE`, and `NODE_VERSION` variables. Eg: `curl ... | NVM_DIR=/usr/local/nvm bash` for a global install.