diff options
Diffstat (limited to 'aux/workflow')
-rwxr-xr-x | aux/workflow/assert-manpages.sh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/aux/workflow/assert-manpages.sh b/aux/workflow/assert-manpages.sh index d609685..be9c23d 100755 --- a/aux/workflow/assert-manpages.sh +++ b/aux/workflow/assert-manpages.sh @@ -179,6 +179,13 @@ Komentoj kaj diskutoj EOF +# +# This assumes that the naming convention of the manpage files is: +# a-name.$lang.[0-9] +# +# Having extra periods in the middle or at the end would violate this +# assumption, and the code below won't work. +# # shellcheck disable=2044 for f in $(find doc -type f -name '*.[0-9]'); do LINES="$(wc -l "$f" | cut -d\ -f1)" @@ -192,6 +199,9 @@ for f in $(find doc -type f -name '*.[0-9]'); do lang="$(echo "$f" | cut -d. -f2)" case "$lang" in + en) + EXPECTED="$EXPECTED_EN" + ;; pt) EXPECTED="$EXPECTED_PT" ;; @@ -202,7 +212,8 @@ for f in $(find doc -type f -name '*.[0-9]'); do EXPECTED="$EXPECTED_EO" ;; *) - EXPECTED="$EXPECTED_EN" + printf 'Unsupported lang: %s\n' "$lang" >&2 + exit 2 ;; esac |