diff options
author | EuAndreh <eu@euandre.org> | 2021-06-26 21:48:18 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-06-26 21:49:20 -0300 |
commit | 59f34fe49527fc697bd86145aa974076c83eb404 (patch) | |
tree | ee4748e63d034b86e50b78724d5812cd7e001681 /aux/workflow/assert-manpages.sh | |
parent | aux/utils.sh: Remove unused file (diff) | |
download | remembering-59f34fe49527fc697bd86145aa974076c83eb404.tar.gz remembering-59f34fe49527fc697bd86145aa974076c83eb404.tar.xz |
aux/: Update, adapt Makefile accordingly
Diffstat (limited to 'aux/workflow/assert-manpages.sh')
-rwxr-xr-x | aux/workflow/assert-manpages.sh | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/aux/workflow/assert-manpages.sh b/aux/workflow/assert-manpages.sh index a2bd3f9..d609685 100755 --- a/aux/workflow/assert-manpages.sh +++ b/aux/workflow/assert-manpages.sh @@ -1,22 +1,35 @@ #!/bin/sh set -eu -PROJECT="$1" -MAILING_LIST="$2" -shift -shift TLD="$(cat aux/tld.txt)" - IN_PLACE=false -while getopts 'i' flag; do +while getopts 'n:m:i' flag; do case "$flag" in + n) + PROJECT="$OPTARG" + ;; + m) + MAILING_LIST="$OPTARG" + ;; i) IN_PLACE=true ;; *) + exit 2 ;; esac done +shift $((OPTIND - 1)) + +assert_arg() { + if [ -z "$1" ]; then + echo "Missing $2" >&2 + exit 2 + fi +} + +assert_arg "${PROJECT:-}" '-n PROJECT' +assert_arg "${MAILING_LIST:-}" '-m MAILING_LIST' EXPECTED_EN="$(mktemp)" |