interplane.Get Omega
Read in your language

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

branch main Branches Tags History

interplane.io / scripts / pin-omc.sh

14 lines · 824 bytes Raw Blame History
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
6set -eu
7G=${OMEGA_GIT:-$HOME/git/omega-mv.git}
8ROOT=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
9LINE=$(git -C "$G" show main:seed/out/omc.sha256)
10FROM=$(git -C "$G" log -1 --format=%H main -- seed/out/omc.sha256)
11printf '%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; }
13printf '%s\nomega-mv %s\n' "$LINE" "$FROM" > "$ROOT/native/omc.sha256"
14cat "$ROOT/native/omc.sha256"