From 924d9659644e55deb05fe9e47d7c243ed0bff190 Mon Sep 17 00:00:00 2001 From: Tim Caswell Date: Fri, 10 Dec 2010 12:43:27 -0800 Subject: [PATCH] Clean up npm integration a little bit Change-Id: I849f1056d0188aef264777e18270728b1535f61c --- README.markdown | 2 +- install.sh | 4 +--- nvm.sh | 6 ++++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.markdown b/README.markdown index d72720c..274ffea 100644 --- a/README.markdown +++ b/README.markdown @@ -19,7 +19,7 @@ Often I also put in a line to use a specific version of node. ## Usage -To download, compile, and install the v0.2.5 release of node do this: +To download, compile, and install the v0.2.5 release of node, do this: nvm install v0.2.5 diff --git a/install.sh b/install.sh index 8ad7d20..d5a66cd 100755 --- a/install.sh +++ b/install.sh @@ -9,9 +9,7 @@ if [ "x$has" != "x" ]; then fi cat <>~/.bashrc # ADDED BY npm FOR NVM -NVM_DIR=$dir -. \$NVM_DIR/nvm.sh -nvm use +. $dir/nvm.sh # END ADDED BY npm FOR NVM NVM_CODE diff --git a/nvm.sh b/nvm.sh index 9abec5a..58646f3 100644 --- a/nvm.sh +++ b/nvm.sh @@ -46,8 +46,10 @@ nvm() make && \ make install && \ nvm use $2 - echo "Installing NPM..." - curl http://npmjs.org/install.sh | sh + if ! which npm ; then + echo "Installing npm..." + curl http://npmjs.org/install.sh | sh + fi cd $START ;; "deactivate" )