From 0f02b1bf62005b451ff4b91a88716cb6e0365849 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sat, 12 Jun 2021 22:19:28 -0300 Subject: Makefile: Add aux/workflow/assert-manpages.sh --- Makefile | 1 + aux/workflow/assert-manpages.sh | 44 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 aux/workflow/assert-manpages.sh diff --git a/Makefile b/Makefile index eefe257..15cac33 100644 --- a/Makefile +++ b/Makefile @@ -24,6 +24,7 @@ dev-check: check sh aux/workflow/assert-todos.sh sh aux/workflow/assert-changelog.sh $(NAME) sh aux/workflow/assert-readme.sh $(NAME) $(MAILING_LIST) + sh aux/workflow/assert-manpages.sh $(NAME) $(MAILING_LIST) do_subst = sed \ -e 's:[@]VERSION[@]:$(VERSION):g' \ diff --git a/aux/workflow/assert-manpages.sh b/aux/workflow/assert-manpages.sh new file mode 100644 index 0000000..712a2bb --- /dev/null +++ b/aux/workflow/assert-manpages.sh @@ -0,0 +1,44 @@ +#!/bin/sh +set -eu + +PROJECT="$1" +MAILING_LIST="$2" +TLD="$(cat aux/tld.txt)" + +EXPECTED="$(mktemp)" +cat <> "$EXPECTED" +. +. +.SH AUTHORS +.P +EuAndreh +.MT eu@euandre.org +.ME +and contributors. +. +. +.SH BUGS +Report bugs to: +.MT ~euandreh/$MAILING_LIST@lists.sr.ht +.ME +.br +Browse bugs at: +.UR https://$TLD/$PROJECT/TODOs.html +.UE +.br +Home page: +.UR https://$TLD/$PROJECT/ +.UE +.br +Discussions: +.UR https://lists.sr.ht/~euandreh/$MAILING_LIST?search=[$PROJECT] +.UE +EOF + +# shellcheck disable=2044 +for f in $(find doc -type f -name '*.[0-9]'); do + if ! tail -n "$(wc -l < "$EXPECTED")" "$f" | diff - "$EXPECTED"; then + echo "Missing metadata at the end of \"$f\" file" + exit 1 + fi +done -- cgit v1.2.3