interplane-forge
INTERPLANE Forge
Brought by drakestapleton
interplane-forge / contrib / build.sh
| 1 | #!/bin/sh |
| 2 | # Build forge-contribute with the pinned omc. Host oracles: git, rad, /usr/bin/env. |
| 3 | # Heavy: run it under a queen pool lock, e.g. flock ~/handoffs/hive/queen/pool-12-14.lock sh contrib/build.sh OUT |
| 4 | set -eu |
| 5 | cd "$(dirname "$0")/.." |
| 6 | OMV=$HOME/work/flux/omega-mv |
| 7 | OMC=$OMV/seed/out/omc |
| 8 | PIN=3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194 |
| 9 | got=$(sha256sum "$OMC" | cut -d' ' -f1) |
| 10 | if [ "$got" != "$PIN" ]; then |
| 11 | echo "build.sh: omc sha256 $got is not the pin" >&2 |
| 12 | exit 1 |
| 13 | fi |
| 14 | CORES=${FORGED_CPUS:-12,13,14} |
| 15 | out=${1:-contrib/forge-contribute} |
| 16 | tmp=$out.new |
| 17 | { |
| 18 | printf 'om2\n' |
| 19 | cat "$OMV/om/tls/sha2.om" server/util.om quiet/qn2bind.om quiet/qn1dig.om contrib/forge-contribute.om |
| 20 | } | taskset -c "$CORES" nice -n 10 "$OMC" > "$tmp" |
| 21 | chmod 755 "$tmp" |
| 22 | mv "$tmp" "$out" |
| 23 | echo "built $out" |