From 5e42ec32b98e3f6e19ce10c11cf7c6b85cd48a3a Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Tue, 12 Jan 2021 18:19:21 -0500 Subject: List both Makefile and html.sh under README.7 --- bin/Makefile | 14 +++++++------- bin/html.sh | 24 ++++++++++++++++-------- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/bin/Makefile b/bin/Makefile index 5820051c..8e0cb324 100644 --- a/bin/Makefile +++ b/bin/Makefile @@ -134,22 +134,22 @@ htmltags: *.[chly] .SUFFIXES: .html .c.html: - sh html.sh $< man1/${<:.c=.1} > $@ + sh html.sh man1/${<:.c=.1} $< > $@ .h.html: - sh html.sh $< man3/${<:.h=.3} > $@ + sh html.sh man3/${<:.h=.3} $< > $@ .y.html: - sh html.sh $< man1/${<:.y=.1} > $@ + sh html.sh man1/${<:.y=.1} $< > $@ .sh.html: - sh html.sh $< man1/${<:.sh=.1} > $@ + sh html.sh man1/${<:.sh=.1} $< > $@ .pl.html: - sh html.sh $< man1/${<:.pl=.1} > $@ + sh html.sh man1/${<:.pl=.1} $< > $@ -index.html: Makefile README.7 - sh html.sh Makefile README.7 > $@ +index.html: README.7 Makefile html.sh + sh html.sh README.7 Makefile html.sh > $@ install-html: ${HTMLS} install -d ${WEBROOT}/bin diff --git a/bin/html.sh b/bin/html.sh index 600d37f5..5b59003f 100644 --- a/bin/html.sh +++ b/bin/html.sh @@ -3,12 +3,15 @@ set -eu readonly GitURL='https://git.causal.agency/src/tree/bin' -src=$1 -man=${2:-} +man=$1 +shift + +title=${man##*/} +title=${title%.[1-9]} cat < -${src} +${title}