Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2011-02-23 05:04:24 +0300
committerisaacs <i@izs.me>2011-02-23 05:04:24 +0300
commitd7d8662bf1860c655c6cc2324e3daa13efdfdf98 (patch)
treebd9bfa36e3c01ff0a4c8087f6229015da6a73c8d
parent0c03b68597a7b03609c06c95a84546e43aa7dc8a (diff)
Closes GH-609 `make install` installs current, not latest
`make latest` to do the old behavior.
-rw-r--r--Makefile20
-rwxr-xr-xscripts/install.sh4
2 files changed, 17 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 01abd7799..2a9c80d8b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,5 @@
SHELL = bash
-
docs = $(shell find doc -name '*.md' \
|sed 's|.md|.1|g' \
|sed 's|doc/|man1/|g' )
@@ -8,15 +7,24 @@ docs = $(shell find doc -name '*.md' \
doc_subfolders = $(shell find doc -type d \
|sed 's|doc/|man1/|g' )
+# This is the default make target.
+# Since 'make' typically does non-installation build stuff,
+# it seems appropriate.
submodules:
! [ -d .git ] || git submodule update --init
-install: submodules
- node cli.js install npm
+latest: submodules
+ @echo "Installing latest published npm"
+ @echo "Use 'make install' or 'make link' to install the code"
+ @echo "in this folder that you're looking at right now."
+ node cli.js install
-dev: submodules
+install: submodules
node cli.js install
+# backwards compat
+dev: install
+
link: uninstall
node cli.js link
@@ -24,7 +32,7 @@ clean: uninstall
uninstall: submodules
node cli.js cache clean
- node cli.js rm npm -r
+ node cli.js rm npm -f
man: man1
@@ -52,4 +60,4 @@ publish: link
&& git push origin master \
&& npm publish
-.PHONY: install install-dev link doc clean uninstall test man
+.PHONY: latest install dev link doc clean uninstall test man
diff --git a/scripts/install.sh b/scripts/install.sh
index 2f60bc4e5..627292239 100755
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -85,8 +85,10 @@ cd "$TMP" \
exit $ret
fi) \
&& (if ! [ "$make" = "NOMAKE" ]; then
- $make uninstall dev
+ $make clean install
else
+ $node cli.js cache clean
+ $node cli.js rm npm -f
$node cli.js install .
fi) \
&& cd "$BACK" \