#!/usr/bin/env bash set -euo pipefail cd "$(dirname "$0")" GO="${GO:-$(command -v go || true)}" if [[ -z "$GO" && -x /opt/homebrew/bin/go ]]; then GO=/opt/homebrew/bin/go fi if [[ -z "$GO" ]]; then echo "go not found; brew install go" >&2 exit 1 fi echo "building linux/arm64 with $GO" OUT="${OUT:-../proxy-android-arm64}" GOOS=linux GOARCH=arm64 CGO_ENABLED=0 "$GO" build -ldflags='-s -w' -o "$OUT" . file "$OUT" ls -lh "$OUT" # Prefer: from repo root → bin/proxyctl.exe build