diff options
author | isaacs <i@izs.me> | 2010-05-03 09:12:47 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2010-05-03 09:12:47 +0400 |
commit | 8d625f20cefcfbf52eb46ff41997c2804c8b2b35 (patch) | |
tree | a6bddf543346ffa9696d2431d75ea289908e34bb /Makefile | |
parent | 79d79cfc1bde77b3215c2d9769ea9db28d023de0 (diff) |
Install all the man files as npm-<section> so that you can do man npm-foo instead of npm help foo
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -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 |