aboutsummaryrefslogtreecommitdiff
path: root/spelling/check-spelling.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2019-06-01 08:56:27 -0300
committerEuAndreh <eu@euandre.org>2019-06-01 08:56:27 -0300
commit124599d68bde620320b3d4578de970fc8b385173 (patch)
treee9c94939d792c56e79294075fbb498213e9cd39d /spelling/check-spelling.sh
parentFix check-spelling.sh linter offenses (diff)
downloadeuandre.org-124599d68bde620320b3d4578de970fc8b385173.tar.gz
euandre.org-124599d68bde620320b3d4578de970fc8b385173.tar.xz
Make hunspell call more clear
Diffstat (limited to 'spelling/check-spelling.sh')
-rwxr-xr-xspelling/check-spelling.sh10
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."