diff options
author | EuAndreh <eu@euandre.org> | 2019-06-01 08:56:27 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2019-06-01 08:56:27 -0300 |
commit | 124599d68bde620320b3d4578de970fc8b385173 (patch) | |
tree | e9c94939d792c56e79294075fbb498213e9cd39d /spelling | |
parent | Fix check-spelling.sh linter offenses (diff) | |
download | euandre.org-124599d68bde620320b3d4578de970fc8b385173.tar.gz euandre.org-124599d68bde620320b3d4578de970fc8b385173.tar.xz |
Make hunspell call more clear
Diffstat (limited to '')
-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." |