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.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/aux/workflow/assert-spelling.sh b/aux/workflow/assert-spelling.sh
index cdc6d28..f1eef6f 100755
--- a/aux/workflow/assert-spelling.sh
+++ b/aux/workflow/assert-spelling.sh
@@ -1,11 +1,13 @@
#!/bin/sh
set -eu
+. aux/lib.sh
+
sort_dicts() {
for f in po/spelling/*.txt; do
if ! LANG=POSIX sort "$f" | diff - "$f"; then
if [ "$IN_PLACE" = true ]; then
- OUT="$(mktemp)"
+ OUT="$(mkstemp)"
LANG=POSIX sort "$f" | uniq > "$OUT"
mv "$OUT" "$f"
else
@@ -57,10 +59,10 @@ get_lang() {
'
}
-ACC="$(mktemp)"
+ACC="$(mkstemp)"
for f in "$@"; do
l="$(get_lang "$f")"
- CURR_DICT="$(mktemp)"
+ CURR_DICT="$(mkstemp)"
cat po/spelling/international.txt "po/spelling/$l.txt" | sort | uniq > "$CURR_DICT"
hunspell -u3 -H -d "$l" -p "$CURR_DICT" "$f" | tee -a "$ACC" >&2
done