diff options
author | EuAndreh <eu@euandre.org> | 2021-06-26 18:50:22 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-06-26 21:07:43 -0300 |
commit | 9b96916293674364960a60bda602f731bc7cc25a (patch) | |
tree | 1a3939178b7cdc56f704036be03741b3829c2ca7 /aux | |
parent | aux/workflow/assert-changelog.sh: Use getopts for arugments (diff) | |
download | git-permalink-9b96916293674364960a60bda602f731bc7cc25a.tar.gz git-permalink-9b96916293674364960a60bda602f731bc7cc25a.tar.xz |
aux/workflow/assert-spelling.sh: Define assert_arg anyway
Diffstat (limited to 'aux')
-rwxr-xr-x | aux/workflow/assert-spelling.sh | 12 |
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" |