← back to Wallco Ai
seam-wave: bash-3.2 compat — replace declare -A (unsupported on macOS bash) with grep-based exclude membership
d08b86e74ac2a1825283071abe1d8201ad5e7ded · 2026-06-11 18:38:16 -0700 · Steve Abrams
Files touched
Diff
commit d08b86e74ac2a1825283071abe1d8201ad5e7ded
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Thu Jun 11 18:38:16 2026 -0700
seam-wave: bash-3.2 compat — replace declare -A (unsupported on macOS bash) with grep-based exclude membership
---
scripts/seam-wave.sh | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/scripts/seam-wave.sh b/scripts/seam-wave.sh
index a598691..8187bd9 100755
--- a/scripts/seam-wave.sh
+++ b/scripts/seam-wave.sh
@@ -46,19 +46,21 @@ read_roots() {
[ -f "$MANIFEST" ] || return 0
grep -vE '^\s*(#|$)' "$MANIFEST" | tr -d ' \t' || true
}
-# retired roots to subtract (glassware-dominant / unrescuable — see exclude file)
-declare -A EXCL=()
+# retired roots to subtract (glassware-dominant / unrescuable — see exclude file).
+# bash-3.2 compatible (macOS) — no associative arrays; membership via grep.
+EXCL_LIST=""
if [ -f "$EXCLUDE" ]; then
- while IFS= read -r e; do [ -n "$e" ] && EXCL["$e"]=1; done < <(grep -vE '^\s*(#|$)' "$EXCLUDE" | sed 's/[[:space:]]*#.*//' | tr -d ' \t')
+ EXCL_LIST="$(grep -vE '^[[:space:]]*(#|$)' "$EXCLUDE" | sed 's/[[:space:]]*#.*//' | tr -d ' \t' | grep -v '^$' || true)"
fi
+is_excluded() { [ -n "$EXCL_LIST" ] && printf '%s\n' "$EXCL_LIST" | grep -qx "$1"; }
ALL_ROOTS=()
while IFS= read -r r; do
[ -z "$r" ] && continue
- [ -n "${EXCL[$r]:-}" ] && continue # skip retired roots
+ is_excluded "$r" && continue # skip retired roots
ALL_ROOTS+=("$r")
done < <(read_roots)
TOTAL="${#ALL_ROOTS[@]}"
-EXCL_N="${#EXCL[@]}"
+EXCL_N="$(printf '%s\n' "$EXCL_LIST" | grep -c . 2>/dev/null || echo 0)"
NEXT=0
[ -f "$STATE" ] && NEXT="$(node -e 'try{process.stdout.write(String((require("./'"$STATE"'").nextIndex)||0))}catch(e){process.stdout.write("0")}' 2>/dev/null || echo 0)"
← 1dc9a01 seam-wave: retire 54076+54266 (glassware-dominant, unrescuab
·
back to Wallco Ai
·
Add autonomous overnight seam-fix wave runner (DTD-gated, se f1efeda →