interplane.Get Omega
Read in your language

interplane-forge

INTERPLANE Forge

Brought by drakestapleton

branch main Branches Tags History

interplane-forge / tools / doi / build.sh

15 lines · 585 bytes Raw Blame History
1#!/bin/sh
2# Compile only; no request, token or deposit. Usage: build.sh [OMC [OUTDIR]].
3set -eu
4export LC_ALL=C
5D=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
6OMC=${1:-$HOME/work/flux/omega-mv/seed/out/omc}
7OUT=${2:-$D/../../.build/doi}
8PIN=3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194
9actual=$(sha256sum "$OMC"); actual=${actual%% *}
10[ "$actual" = "$PIN" ] || { echo 'doi build: omc is not the pin' >&2; exit 2; }
11mkdir -p -- "$OUT"
12trap 'rm -f -- "$OUT/doi.new"' EXIT
13"$OMC" < "$D/doi.om" > "$OUT/doi.new"
14chmod 755 "$OUT/doi.new"
15mv -- "$OUT/doi.new" "$OUT/doi"