diff options
Diffstat (limited to 'bin/html.sh')
-rw-r--r-- | bin/html.sh | 24 |
1 files changed, 16 insertions, 8 deletions
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 <<EOF <!DOCTYPE html> -<title>${src}</title> +<title>${title}</title> <style> $(./scheme -s) @@ -59,8 +62,13 @@ EOF opts='fragment' [ "${man}" = "README.7" ] && opts="${opts},man=%N.html" mandoc -T html -O "${opts}" "${man}" -cat <<EOF -<p> -<a href="${GitURL}/${src}">${src} in git</a> -EOF -./htagml -p -f htmltags "${src}" + +while [ $# -gt 0 ]; do + src=$1 + shift + cat <<-EOF + <p> + <a href="${GitURL}/${src}">${src} in git</a> + EOF + ./htagml -p -f htmltags "${src}" +done |