aboutsummaryrefslogtreecommitdiff
path: root/aux/workflow/assert-spelling.sh
diff options
context:
space:
mode:
Diffstat (limited to 'aux/workflow/assert-spelling.sh')
-rwxr-xr-xaux/workflow/assert-spelling.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/aux/workflow/assert-spelling.sh b/aux/workflow/assert-spelling.sh
index 7451abb..3781454 100755
--- a/aux/workflow/assert-spelling.sh
+++ b/aux/workflow/assert-spelling.sh
@@ -35,10 +35,14 @@ while getopts 'l:i' flag; do
done
shift $((OPTIND -1))
-if [ -z "${LANGS:-}" ]; then
- echo 'Missing -l LANGS' >&2
- exit 2
-fi
+assert_arg() {
+ if [ -z "$1" ]; then
+ echo "Missing $2" >&2
+ exit 2
+ fi
+}
+
+assert_arg "${LANGS:-}" '-l LANGS'
mkdir -p doc/spelling
eval "touch doc/spelling/{international,$(echo "$LANGS" | tr ' ' ,)}.txt"