#!/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