aboutsummaryrefslogtreecommitdiff
path: root/aux/workflow
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-06-14 15:17:03 -0300
committerEuAndreh <eu@euandre.org>2021-06-14 15:17:03 -0300
commit67c9c0102678ff7b82ad284942aad7f572b2ac1e (patch)
treeb2c724463cceaaeba47b376370c3d46bb21ffd09 /aux/workflow
parentTODOs.md: Mark #task-f1b27444-f824-353e-6e89-63974dcce550 as DONE (diff)
downloadremembering-67c9c0102678ff7b82ad284942aad7f572b2ac1e.tar.gz
remembering-67c9c0102678ff7b82ad284942aad7f572b2ac1e.tar.xz
aux/workflow/assert-manpages.sh: Add -i flag
Diffstat (limited to 'aux/workflow')
-rw-r--r--aux/workflow/assert-manpages.sh19
1 files changed, 18 insertions, 1 deletions
diff --git a/aux/workflow/assert-manpages.sh b/aux/workflow/assert-manpages.sh
index e7ab27b..2453c48 100644
--- a/aux/workflow/assert-manpages.sh
+++ b/aux/workflow/assert-manpages.sh
@@ -3,8 +3,21 @@ set -eu
PROJECT="$1"
MAILING_LIST="$2"
+shift
+shift
TLD="$(cat aux/tld.txt)"
+IN_PLACE=false
+while getopts 'i' flag; do
+ case "$flag" in
+ i)
+ IN_PLACE=true
+ ;;
+ *)
+ ;;
+ esac
+done
+
EXPECTED="$(mktemp)"
cat <<EOF >> "$EXPECTED"
.
@@ -41,6 +54,10 @@ EOF
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
+ if [ "$IN_PLACE" = true ]; then
+ cat "$EXPECTED" >> "$f"
+ else
+ exit 1
+ fi
fi
done