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>2010-05-03 09:12:47 +0400
committerisaacs <i@izs.me>2010-05-03 09:12:47 +0400
commit8d625f20cefcfbf52eb46ff41997c2804c8b2b35 (patch)
treea6bddf543346ffa9696d2431d75ea289908e34bb
parent79d79cfc1bde77b3215c2d9769ea9db28d023de0 (diff)
Install all the man files as npm-<section> so that you can do man npm-foo instead of npm help foo
-rw-r--r--Makefile18
1 files changed, 13 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 3ac3ff96c..c65df9f13 100644
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,23 @@
-docs = $(shell ls doc/*.md | sed 's|.md|.1|g' | sed 's|doc/|man/|g')
+docs = $(shell ls doc/*.md \
+ |sed 's|.md|.1|g' \
+ |sed 's|doc/|man/|g' \
+ )
-install: doc
+install: doc_install
node install-npm.js
- cp man/npm.1 /usr/local/share/man/man1/npm.1
+
+doc_install: doc
+ cd man && \
+ for d in $(shell ls *.1); do \
+ cp man/$$d /usr/local/share/man/man1/npm-$$d; \
+ done;
clean:
rm -r man
uninstall: clean
- rm /usr/local/share/man/man1/npm.1
+ rm /usr/local/share/man/man1/npm{-*,}.1
@echo TODO - npm uninstall itself
man:
@@ -20,4 +28,4 @@ doc: man $(docs)
man/%.1: doc/%.md
ronn --roff $< > $@
-.PHONY: install doc clean uninstall
+.PHONY: install doc clean uninstall doc_install