#!/bin/sh set -eu PROJECT="$1" MAILING_LIST="$2" TLD="$(cat aux/tld.txt)" EXPECTED="$(mktemp)" cat <> "$EXPECTED" . . .SH AUTHORS .P .MT eu@euandre.org EuAndreh .ME and contributors. . . .SH BUGS Report bugs to the .MT ~euandreh/$MAILING_LIST@lists.sr.ht mailing list .ME . .br Browse bugs .UR https://$TLD/$PROJECT/TODOs.html online .UE . .br .UR https://$TLD/$PROJECT/ Home page .UE . .br .UR https://lists.sr.ht/~euandreh/$MAILING_LIST?search=[$PROJECT] Comments and discussions .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