#!/usr/bin/env bash # The reference at its pins into external/: pcenginecd-python v0.1.0, the base board it runs on # (pcengine-python v0.1.0), the core (huc6280-python v0.3.0) and the frame the core pins # (6502-python 2146eba). No venv and nothing installed: # the gate runs PyPy with PYTHONPATH over the four src/ directories (scripts/pcecd_trace.py). # Usage: scripts/fetch_reference.sh (sources default to the local clones beside this one) set -euo pipefail ROOT=$(cd "$(dirname "$0")/.." && pwd) fetch() { # name pin commit source local dest="$ROOT/external/$1" if [ ! -d "$dest/.git" ]; then git clone -q "$4" "$dest" fi git -C "$dest" fetch -q --tags origin 2>/dev/null || true git -C "$dest" checkout -q "$3" echo "$1 $2 ($(git -C "$dest" rev-parse --short HEAD)) in $dest" } fetch pcenginecd-python v0.1.0 5fec99e "${PCENGINECD_PYTHON:-$ROOT/../pcenginecd-python}" fetch pcengine-python v0.1.0 bc9b976f8b6ba29ff16fdcbd527978899d7e54b4 "${PCENGINE_PYTHON:-$ROOT/../pcengine-python}" fetch huc6280-python v0.3.0 bf20330d4ce4e0e126331433bad03f4e4d0e9a2e "${HUC6280_PYTHON:-$ROOT/../huc6280-python}" fetch 6502-python 2146eba 2146eba3b3da4d2cc6c8fa3994f100bcb5abf039 "${SIXFIVEOHTWO_PYTHON:-$ROOT/../6502-python}"