diff options
Diffstat (limited to 'spelling/check-spelling.sh')
-rwxr-xr-x | spelling/check-spelling.sh | 10 |
1 files 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." |