interplane.Get Omega
Read in your language

interplane-forge

INTERPLANE Forge

Brought by drakestapleton

branch main Branches Tags History

interplane-forge / contrib / build.sh

23 lines · 797 bytes Raw Blame History
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
4set -eu
5cd "$(dirname "$0")/.."
6OMV=$HOME/work/flux/omega-mv
7OMC=$OMV/seed/out/omc
8PIN=3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194
9got=$(sha256sum "$OMC" | cut -d' ' -f1)
10if [ "$got" != "$PIN" ]; then
11 echo "build.sh: omc sha256 $got is not the pin" >&2
12 exit 1
13fi
14CORES=${FORGED_CPUS:-12,13,14}
15out=${1:-contrib/forge-contribute}
16tmp=$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"
21chmod 755 "$tmp"
22mv "$tmp" "$out"
23echo "built $out"