#!/usr/bin/env bash # SPDX-License-Identifier: MIT # The reference, ym2612-python, at the pin, into the git-ignored external/ym2612-python. It # imports nothing, so no venv: the scripts run it with PYTHONPATH. PyPy is used when found. # Usage: scripts/fetch_ym2612python.sh [source repo, default ../ym2612-python] set -euo pipefail ROOT=$(cd "$(dirname "$0")/.." && pwd) PIN=44d504e8fad57a387c108f2538a6350e654dc2f2 SRC=${1:-"$ROOT/../ym2612-python"} DEST="$ROOT/external/ym2612-python" mkdir -p "$ROOT/external" [ -d "$DEST/.git" ] || git clone -q "$SRC" "$DEST" git -C "$DEST" checkout -q "$PIN" echo "ym2612-python at $(git -C "$DEST" rev-parse --short HEAD) in $DEST"