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/omega-mv/blob/main/tools/trit/build.sh # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / tools / trit / build.sh` 17 lines ยท 1000 bytes Raw Blame History 1 #!/bin/sh 2 # build.sh -- compile tools/trit/trit.om with the seeded omc, after the seeded SHA-256 core. 3 # Run from the repo root: sh tools/trit/build.sh (OMC defaults to seed/out/omc) 4 # The composition mirrors seed/omega-from-seed.sh step 5 (diaggen): om2 line, the sha256.om core 5 # up to "fn sha256", then the program. Prints the sha256 of the composed source and the binary. 6 set -eu 7 R=$(CDPATH= cd -- "$(dirname "$0")/../.." && pwd) 8 cd "$R" 9 OMC=${OMC:-seed/out/omc} 10 B=${B:-build/trit} 11 mkdir -p "$B" 12 # omc refuses an `abstract` line after any `fn` (error 9), and the core ends in functions, so the 13 # trit type line is lifted ahead of the core. 14 { printf 'om2\n'; grep '^abstract ' tools/codebook/codebook.om; sed '/^fn sha256 /,$d' seed/trace/sha256.om; grep -v '^abstract ' tools/codebook/codebook.om; cat tools/trit/trit.om; } > "$B/trit.full.om" 15 "$OMC" < "$B/trit.full.om" > "$B/trit" 16 chmod +x "$B/trit" 17 sha256sum "$OMC" tools/codebook/codebook.om tools/trit/trit.om "$B/trit.full.om" "$B/trit"