summaryrefslogtreecommitdiff
path: root/src/lib/config.staging.source.sh
AgeCommit message (Collapse)Author
2026-07-18Support FreeBSD and macOS via resolved GNU tool variablesPaul Buetow
shuriken relied on GNU-only extensions (find -printf, stat -c, cp -a, sort -R) and hard-refused to run outside Linux. Resolve each of the four tools once at startup to a FIND/STAT/CP/SORT variable, preferring a g-prefixed sibling (gfind, gstat, gcp, gsort) when present on PATH - mirroring the $SED/$GREP/$DATE tool-selection pattern in the sibling gemtexter project - so the same source runs unmodified on Linux, macOS, and FreeBSD once GNU coreutils/findutils are installed there. - src/lib/compat.source.sh: add resolve_gnu_tool + FIND/STAT/CP/SORT; add a fast verify_gnu_tool_versions preflight (--version contains "GNU") ahead of the existing behavioral probes, which now run against the resolved variables instead of hardcoded tool names; split the probes and error reporting into their own ~30-line functions. - Replace the GNU-only find -printf / stat -c / cp -a / sort -R call sites in photo-list, image, album-photo-select, metadata-cache, config.staging, and random source files with the resolved variables. POSIX-portable find/sort calls elsewhere are untouched. - README.md: drop the "Linux-only" claim; document brew/pkg GNU coreutils+findutils install steps for macOS and FreeBSD. - tests/cli.sh: add coverage for the g-prefixed-sibling preference and for the new --version-string preflight's error message, alongside the existing behavioral-probe guard tests. just build / just check-generated / just shellcheck / just test / git diff --check all pass. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-06-15Fix dist root permissions so --sync publishes a readable directoryPaul Buetow
The dist directory is the swapped-in staging dir, which mktemp -d creates mode 0700. The published album root therefore stayed 0700, so the first `shuriken --sync` created the remote album directory 0700 and the web server (daemon) could not read it -- requiring a manual chmod 755 on each mirror. Relax the staging dir to the umask-default directory mode right after mktemp -d (what mkdir would have produced), so the dist root matches its subdirectories and is served/synced with sane permissions. Add a regression test asserting the dist root mode equals its photos/ subdirectory mode. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15Persist the EXIF cache in a volatile ./cache dir parallel to ./distPaul Buetow
The per-photo `identify -verbose` cache lived in $DIST_DIR/.shuriken-cache, which is inside the throwaway staging dir and the published dist: a fresh/cleared dist lost it (forcing a full, slow re-identify of every original) and it got deployed to web servers. Move it to a volatile ./cache/exif directory parallel to ./dist (dirname of DIST_DIR resolves to the working dir in both the staging and direct contexts). Now an unchanged photo skips identify on every regenerate, the cache survives a cleared dist, and it is never deployed. --force clears ./cache/exif once up front (clear_exif_cache) and the run repopulates it, so force still does exactly one identify per photo. Dropped .shuriken-cache from the staging-copy loop. Tests and the audit doc updated for the new cache location. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11Split config module concerns for task 9m0Paul Buetow