#!/usr/bin/env bash # SPDX-License-Identifier: MIT # The reference, pokey-python, at the pin, into external/pokey-python (scripts/env.sh uses it # when POKEY_PYTHON is not set). It imports nothing at run time, so the rung scripts run it # with PYTHONPATH; set REFERENCE_PYTHON to a PyPy (or CPython 3.11+) interpreter. The # reference's git-ignored reference/ (fetched third-party files: AcidSAP among them) is not # cloned: point ACIDSAP_DIR at a fetched copy for rung 1. # Usage: scripts/fetch_pokeypython.sh [source repository, default ../pokey-python] set -euo pipefail ROOT=$(cd "$(dirname "$0")/.." && pwd) PIN=6ed1ffa73220a967cb2add7e978eabfe11502af0 SRC=${1:-"$ROOT/../pokey-python"} DEST="$ROOT/external/pokey-python" mkdir -p "$ROOT/external" [ -d "$DEST/.git" ] || git clone -q "$SRC" "$DEST" git -C "$DEST" fetch -q origin 2>/dev/null || true git -C "$DEST" checkout -q "$PIN" echo "pokey-python at $(git -C "$DEST" rev-parse --short HEAD) in $DEST"