build-linux.sh: NODE_SRC, TARGET_DIR and OUT_DIR made absolute before the cd into the node source (a relative target dir landed inside the node worktree and the copy read the stale repository-relative one; the 0.3.10 cut, twice)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
igneum-josh 2026-10-05 19:26:17 +01:00
parent d1f4923812
commit e0a5fd1909

View file

@ -17,6 +17,11 @@ REPO="$(cd "$HERE/../.." && pwd)"
NODE_SRC="${NODE_SRC:-$REPO/vendor/igneum-node-v4}"
TARGET_DIR="${TARGET_DIR:-$REPO/vendor/igneum-node/target-linux}"
OUT_DIR="${OUT_DIR:-$HERE/out}"
# Every path absolute before the cd into NODE_SRC (5 October 2026, the 0.3.10 cut: a relative TARGET_DIR was resolved by
# cargo inside the node worktree, the copy below read the repository-relative one, and the seed's "new" binary was the
# previous build's bytes, twice).
abs() { case "$1" in /*) printf '%s' "$1" ;; *) printf '%s/%s' "$PWD" "$1" ;; esac; }
NODE_SRC="$(abs "$NODE_SRC")"; TARGET_DIR="$(abs "$TARGET_DIR")"; OUT_DIR="$(abs "$OUT_DIR")"
TARGET="${TARGET:-x86_64-unknown-linux-gnu}"
GLIBC="${GLIBC:-2.36}"
JOBS="${JOBS:-4}"