wm: infra

Download patch

ref: 86611da1a62c3303335b35be4e753dcecf029431
parent: 15ae03ea862fbd3bef2fcde9c34285f8b8e8311a
author: mkf <mkf>
date: Fri Sep 6 00:04:48 EDT 2024

cfg/wm/rules/doc: use new script names and lots of fixes

fix ps and pdf output
fix user output and add listing to users docments
fix a bug where files ending with ps.html would be interpreated as postscript.

--- a/cfg/wm/rules/doc
+++ b/cfg/wm/rules/doc
@@ -1,25 +1,25 @@
 # main document server
 # html, pdf, ps and txt (defualt) available.
-/([^'/]+).htm		cd /usr/git/wm/doc/ ; git/fs ; ms2html < .git/fs/HEAD/tree/'\1'.ms
-#/([^'/]+).html		cd /usr/git/wm/doc/ ; git/fs ; htmlroff -ms -mhtml .git/fs/HEAD/tree/'\1'.ms
-/([^'/]+).html		wm/docweb /usr/git/ wm doc HEAD '\1'
-/([^'/]+).ps		cd /usr/git/wm/doc/ ; git/fs ; troff -ms .git/fs/HEAD/tree/'\1'.ms | dpost | ps2pdf
-/([^'/]+).txt		cd /usr/git/wm/doc/ ; git/fs ; nroff -ms .git/fs/HEAD/tree/'\1'.ms | col -bf
-/index.html		wm/doclist /usr/git/ wm doc HEAD
-/([0-9a-f]{40})/index.html		echo '\1'
+/([^'/]+).ps	wm/doc/ps /usr/git/ wm doc HEAD '\1'
+/([^'/]+).pdf	wm/doc/pdf /usr/git/ wm doc HEAD '\1'
+/([^'/]+).htm	cd /usr/git/wm/doc/ ; git/fs ; ms2html < .git/fs/HEAD/tree/'\1'.ms
+#/([^'/]+).html	cd /usr/git/wm/doc/ ; git/fs ; htmlroff -ms -mhtml .git/fs/HEAD/tree/'\1'.ms
+/([^'/]+).html	wm/doc/html /usr/git/ wm doc HEAD '\1'
+/([^'/]+).txt	wm/doc/txt /usr/git/ wm doc HEAD '\1'
+/index.html	wm/doc/weblist /usr/git/ wm doc HEAD
 
-/([0-9a-f]{40})/([^'/]+).htm		cd /usr/git/wm/doc/ ; git/fs ; ms2html < .git/fs/'\1'/tree/'\2'.ms
-#/([0-9a-f]{40})/([^'/]+).html		cd /usr/git/wm/doc/ ; git/fs ; htmlroff -ms -mhtml .git/fs/'\1'/tree/'\2'.ms
-/([0-9a-f]{40})/([^'/]+).html		wm/docweb /usr/git/ wm doc '\1' '\2'
-/([0-9a-f]{40})/([^'/]+).ps		cd /usr/git/wm/doc/ ; git/fs ; troff -ms .git/fs/'\1'/tree/'\2'.ms | dpost | ps2pdf
-/([0-9a-f]{40})/([^'/]+).txt		cd /usr/git/wm/doc/ ; git/fs ; nroff -ms .git/fs/'\1'/tree/'\2'.ms | col -bf
-/([0-9a-f]+)/index.html		wm/doclist /usr/git/ wm doc '\1'
+#/([0-9a-f]{40})/([^'/]+).htm	cd /usr/git/wm/doc/ ; git/fs ; ms2html < .git/fs/'\1'/tree/'\2'.ms
+#/([0-9a-f]{40})/([^'/]+).html	cd /usr/git/wm/doc/ ; git/fs ; htmlroff -ms -mhtml .git/fs/'\1'/tree/'\2'.ms
+#/([0-9a-f]{40})/([^'/]+).html	wm/docweb /usr/git/ wm doc '\1' '\2'
+#/([0-9a-f]{40})/([^'/]+).ps	cd /usr/git/wm/doc/ ; git/fs ; troff -ms .git/fs/'\1'/tree/'\2'.ms | dpost | ps2pdf
+#/([0-9a-f]{40})/([^'/]+).txt	cd /usr/git/wm/doc/ ; git/fs ; nroff -ms .git/fs/'\1'/tree/'\2'.ms | col -bf
+#/([0-9a-f]+)/index.html	wm/doc/weblist /usr/git/ wm doc '\1'
 
 # user document server
 # it's like main document server, but works with forks
+/usr/([^'/]+)/([^'/]+).ps	wm/doc/ps /usr/git/ '\1' doc HEAD '\2'
+/usr/([^'/]+)/([^'/]+).pdf	wm/doc/pdf /usr/git/ '\1' doc HEAD '\2'
 /usr/([^'/]+)/([^'/]+).htm	cd /usr/git/\1/doc ; git/fs ; ms2html < .git/fs/HEAD/tree/'\2'.ms
-/usr/([^'/]+)/([^'/]+).html	cd /usr/git/\1/doc ; git/fs ; htmlroff -ms -mhtml .git/fs/HEAD/tree/'\2'.ms
-/usr/([^'/]+)/([^'/]+).ps	cd /usr/git/\1/doc ; git/fs ; troff -ms .git/fs/HEAD/tree/'\2'.ms | dpost
-/usr/([^'/]+)/([^'/]+).pdf	cd /usr/git/\1/doc ; git/fs ; troff -ms .git/fs/HEAD/tree/'\2'.ms | dpost | ps2pdf
-/usr/([^'/]+)/([^'/]+).txt	cd /usr/git/\1/doc ; git/fs ; nroff -ms .git/fs/HEAD/tree/'\2'.ms | col -bf
-
+/usr/([^'/]+)/([^'/]+).html	wm/doc/html /usr/git/ '\1' doc HEAD '\2'
+/usr/([^'/]+)/([^'/]+).txt	wm/doc/txt /usr/git/ '\1' doc HEAD '\2'
+/usr/([^'/]+)/index.html	wm/doc/weblist /usr/git/ '\1' doc HEAD