From 6eef4ce4d2b880a47dc0d7bc7a44a8c1fe28d907 Mon Sep 17 00:00:00 2001 From: Joe Lencioni Date: Thu, 28 Jul 2016 10:11:28 -0700 Subject: [PATCH] Use NVM_DIR in installation instructions As suggested by @ljharb, this might be a little cleaner. I'm not entirely sure, but in any case, it is consistent with the upgrade instructions, so that is nice. --- README.markdown | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.markdown b/README.markdown index 830af53..bf0d1a3 100644 --- a/README.markdown +++ b/README.markdown @@ -88,11 +88,11 @@ Or if you have `git` installed: 1. activate nvm by sourcing it from your shell ```sh -( - git clone https://github.com/creationix/nvm.git ~/.nvm - cd ~/.nvm +export NVM_DIR="$HOME/.nvm" && ( + git clone https://github.com/creationix/nvm.git "$NVM_DIR" + cd "$NVM_DIR" git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" origin` -) && . ~/.nvm/nvm.sh +) && . "$NVM_DIR/nvm.sh" ``` Add these lines to your `~/.bashrc`, `~/.profile`, or `~/.zshrc` file to have it automatically sourced upon login: