diff --git a/update-all.sh b/update-all.sh index 411cda0..c7e6494 100755 --- a/update-all.sh +++ b/update-all.sh @@ -58,8 +58,19 @@ step "sync-server-mods.sh" tooling/sync-server-mods.sh # ── 3. regenerate the landing mod list (mods.json + logos) ────────── +# build-modlist.py needs stdlib tomllib (Python >=3.11). The host's default +# `python3` may be older (e.g. Ubuntu 22.04 ships 3.10), so pick the first +# interpreter that satisfies it rather than relying on the shebang. step "build-modlist.py" -tooling/build-modlist.py +PY="" +for p in python3.13 python3.12 python3.11 python3; do + command -v "$p" >/dev/null 2>&1 || continue + if "$p" -c 'import sys; raise SystemExit(0 if sys.version_info >= (3, 11) else 1)' 2>/dev/null; then + PY="$p"; break + fi +done +[ -n "$PY" ] || { echo "no python >=3.11 found (build-modlist.py needs stdlib tomllib)" >&2; exit 1; } +"$PY" tooling/build-modlist.py # ── 4. rebuild the landing site into www/ (gitignored — pull never # updates it, so it must be rebuilt every run) ─────────────────