# SPDX-License-Identifier: MIT # Sourced by the rung scripts: the reference and its interpreter. ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd) REF=${SN76489_PYTHON:-"$ROOT/external/sn76489-python"} [ -f "$REF/src/sn76489_python/chip.py" ] || { echo "no reference at $REF: run scripts/fetch_sn76489python.sh" >&2; exit 2; } if [ -z "${PYTHON:-}" ]; then for candidate in "$HOME/.local/opt/pypy/bin/pypy3" "$(command -v pypy3 || true)" "$(command -v python3)"; do [ -n "$candidate" ] && [ -x "$candidate" ] && { PYTHON=$candidate; break; } done fi JOBS=${JOBS:-8}