diff options
author | isaacs <i@izs.me> | 2013-07-12 02:02:04 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2013-07-12 02:08:53 +0400 |
commit | 6306d16992c6c7338ed35f81b73c455db19bbb89 (patch) | |
tree | b8ddf0306dac90d6b2a95ed82add7d189e1855b3 /Makefile | |
parent | 2c9deded3dea548babf4b025874e337323115cf0 (diff) |
doc: Fix links on legacy html docs
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 23 |
1 files changed, 13 insertions, 10 deletions
@@ -86,6 +86,7 @@ doc-clean: node_modules/.bin/ronn \ .building_ronn \ html/doc \ + html/api \ man/man* # use `npm install ronn` for this to work. @@ -174,15 +175,17 @@ publish: link doc docpublish: doc-publish doc-publish: doc # legacy urls - for f in $(shell find html/doc/{cli,files,misc}/ -name '*.html'); do \ - j=$(shell basename $$i | sed 's|^npm-||g'); \ - ! [ -f $$j ] && cp $$i doc/$$j; \ - done - mkdir html/api - for f in $(shell find html/doc/api/ -name '*.html'); do \ - j=$(shell basename $$i | sed 's|^npm-||g'); \ - cp $$i api/$$j; \ - done + for f in $$(find html/doc/{cli,files,misc}/ -name '*.html'); do \ + j=$$(basename $$f | sed 's|^npm-||g'); \ + if ! [ -f html/doc/$$j ] && [ $$j != README.html ] && [ $$j != index.html ]; then \ + perl -pi -e 's/ href="\.\.\// href="/g' <$$f >html/doc/$$j; \ + fi; \ + done + mkdir -p html/api + for f in $$(find html/doc/api/ -name '*.html'); do \ + j=$$(basename $$f | sed 's|^npm-||g'); \ + perl -pi -e 's/ href="\.\.\// href="/g' <$$f >html/api/$$j; \ + done rsync -vazu --stats --no-implied-dirs --delete \ html/doc/ \ node@npmjs.org:/home/node/npm-www/doc @@ -200,7 +203,7 @@ doc-publish: doc html/doc/index.html) continue ;; \ *) rm $$f ;; \ esac; \ - done + done zip-publish: release scp release/* node@nodejs.org:dist/npm/ |