interplane.io
Source of interplane.io: a Rust generator that renders the page from the protocol repository's public record, deployed hourly from the Spark.
Brought by drakestapleton
interplane.io / scripts / pin-omc.sh
| 1 | #!/bin/sh |
| 2 | # Writes native/omc.sha256, the one copy of the compiler pin, from omega-mv main: |
| 3 | # the first line is omega-mv's own seed/out/omc.sha256, the second names the commit that last changed it. |
| 4 | # OMEGA_GIT omega-mv repository (default: $HOME/git/omega-mv.git) |
| 5 | # Usage: sh scripts/pin-omc.sh |
| 6 | set -eu |
| 7 | G=${OMEGA_GIT:-$HOME/git/omega-mv.git} |
| 8 | ROOT=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) |
| 9 | LINE=$(git -C "$G" show main:seed/out/omc.sha256) |
| 10 | FROM=$(git -C "$G" log -1 --format=%H main -- seed/out/omc.sha256) |
| 11 | printf '%s\n' "$LINE" | grep -Eqx '[0-9a-f]{64} seed/out/omc' && [ "$(printf '%s\n' "$LINE" | wc -l)" -eq 1 ] || { |
| 12 | echo "refuse: omega-mv main:seed/out/omc.sha256 is not one hash line: $LINE" >&2; exit 3; } |
| 13 | printf '%s\nomega-mv %s\n' "$LINE" "$FROM" > "$ROOT/native/omc.sha256" |
| 14 | cat "$ROOT/native/omc.sha256" |