# mac-support-scripts ## Goal Make `scripts/install.sh` and `scripts/build.sh` work on stock macOS (BSD find, bash 3.2). Currently both use `mapfile` (bash 4+) and `find -printf` (GNU-only) — fatal on a fresh Mac. Without the fix, the README's "Linux / macOS (bash)" quick-start is a lie. ## Key files - `scripts/install.sh:11` — `mapfile -t names < <(find ... -printf ...)` - `scripts/build.sh:18` — same pattern - `README.md:30-38` — claims macOS bash quick-start works - `.wiki/concepts/build-notes.md` — companion concept page; add a sibling for the install-script portability gotcha ## Decisions log - 2026-04-28: Replace `mapfile` + `find -printf` with shell glob (`for d in "$SRC"/*/`). Reason: works in bash 3.2 (stock macOS) and avoids a `find` flavor dependency. Alternative — require `bash 4+` via `#!/usr/bin/env bash` + version check — rejected: pushes the burden onto Mac users, who would need `brew install bash` for a 30-line script. - 2026-04-28: Don't drop the `set -euo pipefail` line — POSIX-ish bash supports it from 3.x. - 2026-04-28: Final — patched both scripts; verified on git-bash (`bash -n` clean, install dry-run installs all 16 skills sorted alphabetically into temp dir, `build.sh active-platform` produces a valid `.skill` archive); wrote `.wiki/concepts/install-portability.md`; index + log updated; dist/ unchanged (smoke-rebuild was byte-identical so no dist churn). ## Open questions - [ ] None — done. ## Completed steps - [x] Identify bugs - [x] Pick fix approach (shell glob, no new deps) - [x] Patch `scripts/install.sh` - [x] Patch `scripts/build.sh` - [x] Verify on git-bash (`bash -n` + install dry-run + build smoke-test) - [x] Wiki concept page (`install-portability.md`) + index + log - [x] Commit ## Notes - `basename` is in POSIX, fine on Mac. - Empty `skills/` would have `"$SRC"/*/` literal under bash 3.2 without `nullglob`. Guard with `[ -d "$d" ] || continue` — works without `shopt`.