aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-06-26 18:50:22 -0300
committerEuAndreh <eu@euandre.org>2021-06-26 21:07:43 -0300
commit9b96916293674364960a60bda602f731bc7cc25a (patch)
tree1a3939178b7cdc56f704036be03741b3829c2ca7
parentaux/workflow/assert-changelog.sh: Use getopts for arugments (diff)
downloadgit-permalink-9b96916293674364960a60bda602f731bc7cc25a.tar.gz
git-permalink-9b96916293674364960a60bda602f731bc7cc25a.tar.xz
aux/workflow/assert-spelling.sh: Define assert_arg anyway
-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"