Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aien/blob/main/scripts/goal_microjobs/canon-build.sh # aien aien-dev/aien Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aien / scripts / goal_microjobs / canon-build.sh` 23 lines ยท 1286 bytes Raw Blame History 1 #!/bin/sh 2 # Migration-only build adapter, aien-dev/aien#22: no runtime protocol logic. 3 # OMEGA_OMC: `e5b32567` omc; OMEGA_MV: checkout holding Omega `55845e70`. 4 # $1: output binary. No download, substitution, or stale output on refusal. 5 set -eu 6 HERE=$(CDPATH= cd -- "$(dirname -- "$0")/../.." && pwd) 7 OUT=${1:-./canon} 8 blocked() { echo "BLOCKED: $*" >&2; exit 3; } 9 [ -x "${OMEGA_OMC:-}" ] || blocked 'set OMEGA_OMC to pinned omc' 10 [ -n "${OMEGA_MV:-}" ] || blocked 'set OMEGA_MV to SHA unit checkout' 11 [ "$(sha256sum < "$OMEGA_OMC" | cut -c1-64)" = `2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f` ] || blocked 'omc hash mismatch' 12 T=$(mktemp -d) 13 trap 'rm -rf "$T"' EXIT HUP INT TERM 14 git -C "$OMEGA_MV" show `55845e70`:om/sha256/sha256-om2.om > "$T/sha.om" || blocked 'missing SHA unit revision' 15 [ "$(sha256sum < "$T/sha.om" | cut -c1-64)" = `dbf002dd6aa36585632b9d01d98ac3f0bd2fa0f0475082940de53638847994bb` ] || blocked 'SHA unit hash mismatch' 16 # Existing protocols jobpath/build.sh convention: program-mode export removal only. 17 sed 's/^export fn /fn /' "$T/sha.om" > "$T/unit.om" 18 cat "$T/unit.om" "$HERE/src/goal_microjobs/canon.om" > "$T/source.om" 19 "$OMEGA_OMC" < "$T/source.om" > "$T/canon" 20 chmod +x "$T/canon" 21 mv "$T/canon" "$OUT" 22 printf 'built %s\n' "$OUT" 23 sha256sum "$OUT"