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
| 1 | #!/bin/sh |
| 2 | # om/units.sh -- thin compatibility shim over the pure seeded-Omega regenerator (seed/build/units.om). |
| 3 | # Keeps OMC_PIN and NATIVE_PIN at top level for legacy pin-reading scripts (seed/effects/check.sh, om/tls/test/*). |
| 4 | # Regenerates or checks (--check) src/{omega_om_units.c,omega_native.h,omega_api_decl.h,omega_om_units.ident,omega_om_units_fs.c}. |
| 5 | set -eu |
| 6 | OMC_PIN=708fdc0f81866594ed6df2f492b7a8a6bc7456f2d733a838b7f840549ebba6c3 |
| 7 | NATIVE_PIN=9788b27a92c8dd365de7052439653de62f89634189a34cb6b3f582cae65dda83 |
| 8 | ROOT=$(CDPATH= cd -- "$(dirname "$0")/.." && pwd) |
| 9 | SB="$ROOT/seed/build" |
| 10 | [ -f "$SB/units.om" ] || SB="$(pwd)/seed/build" |
| 11 | OMC_BOOT="$ROOT/seed/out/omc" |
| 12 | [ -x "$OMC_BOOT" ] || OMC_BOOT="${OMEGA_OMC:-$(pwd)/seed/out/omc}" |
| 13 | [ -x "$OMC_BOOT" ] || { echo "NOT_RUN: set OMEGA_OMC and OMEGA_BRIDGE"; exit 3; } |
| 14 | cd "$ROOT" |
| 15 | mkdir -p build |
| 16 | BIN="$ROOT/build/om-units.$$" |
| 17 | trap 'rm -f "$BIN"' EXIT |
| 18 | cat "$SB/common.om" "$SB/units.om" | "$OMC_BOOT" > "$BIN" |
| 19 | chmod 755 "$BIN" |
| 20 | rc=0 |
| 21 | OMEGA_OMC_PIN="$OMC_PIN" OMEGA_NATIVE_PIN="$NATIVE_PIN" OMEGA_UNITS_DEST="${OMEGA_UNITS_DEST:-$ROOT/src}" \ |
| 22 | "$BIN" "$@" || rc=$? |
| 23 | exit "$rc" |