From cfd0246b241cb6e58153e68f7e30ed56b9bf054b Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sun, 17 Nov 2024 20:15:02 -0300 Subject: Remove jekyll infrastructure setup --- scripts/assert-spelling.sh | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100755 scripts/assert-spelling.sh (limited to 'scripts/assert-spelling.sh') diff --git a/scripts/assert-spelling.sh b/scripts/assert-spelling.sh deleted file mode 100755 index f0053b4..0000000 --- a/scripts/assert-spelling.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -set -eu - -export LANG=C.UTF-8 -export JEKYLL_ENV=production - -for DICT in scripts/spelling/*.txt; do - sort "$DICT" | diff - "$DICT" || { - echo "The $DICT dictionary is unsorted. To fix it, run:" >&2 - echo " LANG=C.UTF-8 sort $DICT | sponge $DICT" >&2 - exit 1 - } -done - -OUT="$(mktemp)" -jekyll build --future --trace -# shellcheck disable=2044 -for f in $(find _site -type f -name '*.html'); do - if ! echo "$f" | grep -qE '(/vendor/|TODOs.html)'; then - l="$(head -n2 "$f" | tail -n1 | cut -d\" -f2)" - CURR_DICT="$(mktemp)" - cat scripts/spelling/international.txt "scripts/spelling/$l.txt" > "$CURR_DICT" - hunspell -u3 -H -d "$l" -p "$CURR_DICT" "$f" | tee -a "$OUT" - fi -done - -if [ -s "$OUT" ]; then - printf "\nvvv Mispelled words detected by hunspell.\n\n" - cut -d\ -f2- < "$OUT" | sort | uniq - printf "\n^^^\n" >&2 - exit 1 -else - echo "No spelling errors detected" - exit 0 -fi -- cgit v1.2.3