From 124599d68bde620320b3d4578de970fc8b385173 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sat, 1 Jun 2019 08:56:27 -0300 Subject: Make hunspell call more clear --- spelling/check-spelling.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/spelling/check-spelling.sh b/spelling/check-spelling.sh index fb86abe..4e674bb 100755 --- a/spelling/check-spelling.sh +++ b/spelling/check-spelling.sh @@ -18,8 +18,14 @@ for DICT in spelling/*.txt; do } done -hunspell -l -p <(cat spelling/international.dic.txt spelling/en_US.dic.txt spelling/en_US.aff.txt) -d en_US -i utf-8 $(find "$HTML_DIR" -type f -name '*.html') | tee spelling.txt -cat spelling.txt +cat spelling/international.dic.txt spelling/en_US.dic.txt spelling/en_US.aff.txt > dicts.txt +check() { + html="$1" + echo "$1" + hunspell -l -p dicts.txt -d en_US -i utf-8 "$html" | tee -a spelling.txt +} +export -f check +find "${HTML_DIR}" -type f -name '*.html' -print0 | xargs -0 -I{} bash -c "check {}" \; if [[ -s spelling.txt ]]; then echo "Mispelled words detected by hunspell." -- cgit v1.2.3