#!/usr/bin/env bash # Runs a command inside the emulated Debian arm64 root (proot + qemu-user), # with the bakeoff repo mounted at the same path and $HOME/.cache bound in. # scripts/arm64.sh [args...] set -euo pipefail TC=${BAKEOFF_TOOLCHAINS:-$HOME/.local/share/bakeoff-toolchains} repo=$(cd "$(dirname "$0")/.." && pwd) exec "$TC/proot/proot" -0 -q "$TC/qemu/qemu-aarch64-static" -r "$TC/arm64root" \ -b /dev -b /proc -b /sys -b /etc/resolv.conf -b "$repo" -b "${TMPDIR:-/tmp}" -b "$TC" \ -w "$PWD" /usr/bin/env -i HOME=/root PATH=/root/.local/bin:/root/.ghcup/bin:/root/.cargo/bin:/usr/local/bin:/usr/bin:/bin \ TERM=dumb LANG=C.UTF-8 "$@"