#!/usr/bin/env bash # The remote half of tools/build-remote.sh and tools/cross-remote.sh. It runs ON igneum-build-1, fed by lib.sh bs_remote_run # over `ssh build@ bash -s` with these exports prepended (never run it by hand on the Mac): # BR_DIR the crate directory on the box BR_CMD the shell string to run there (cargo ...) # BR_LABEL the slot-file label (ends with "; agent=") # BR_TOOL build-remote | cross-remote BR_KIND node-linux | node-windows | app | app-windows | prove | suite | check | other # BR_WT the worktree name BR_CRATE the crate path relative to the worktree root # BR_COMMAND the cargo command as typed BR_TARGET the rust target triple # BR_BRANCH BR_SHA BR_AGENT the agent name (IGNEUM_AGENT on the Mac, else the worktree) # BR_ARTEFACTS space-separated paths (relative to BR_DIR) the Mac will fetch; empty for test, check, clippy # # 1. Takes a build slot: flock on $IGNEUM_BUILD_SLOTS_DIR/build- for k below the count in .../slots (the box's own slot # files, never the Mac's; 2 since main's ruling of 6 October 2026, 20:3x UK); when every slot is busy it waits up to 2 h on # build-0 and exits 75 if it gives up. The holder line is `pid N since HH:MM:SSZ waited S s: