aboutsummaryrefslogtreecommitdiff
path: root/aux
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-06-12 22:19:28 -0300
committerEuAndreh <eu@euandre.org>2021-06-12 22:26:59 -0300
commit0f02b1bf62005b451ff4b91a88716cb6e0365849 (patch)
treee4bb9c8d6e723ea8e249a269b7f25e8dcaf20d9b /aux
parentdoc/git-permalink.1: Write initial version (diff)
downloadgit-permalink-0f02b1bf62005b451ff4b91a88716cb6e0365849.tar.gz
git-permalink-0f02b1bf62005b451ff4b91a88716cb6e0365849.tar.xz
Makefile: Add aux/workflow/assert-manpages.sh
Diffstat (limited to 'aux')
-rw-r--r--aux/workflow/assert-manpages.sh44
1 files changed, 44 insertions, 0 deletions
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 <<EOF >> "$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