interplane.Get Omega
Read in your language

aienos.com

Source of www.aienos.com, served from my own hardware

Brought by drakestapleton

branch main Branches Tags History

aienos.com / om / support-page / check.sh

30 lines · 1240 bytes Raw Blame History
1#!/bin/sh
2# Verification and artifact capture only; all markup and CSS are authored in support.om.
3set -eu
4cd "$(dirname "$0")/../.."
5omc=${OMEGA_OMC:-om/hive-page/omc}
6pin=734f0a39319fbfa930bcc62cb30dbf06d47d78e126372b74f5baf478e6126b61
7[ -x "$omc" ] || { echo 'support: missing compiler' >&2; exit 2; }
8actual=$(sha256sum "$omc")
9[ "${actual%% *}" = "$pin" ] || { echo 'support: compiler pin mismatch' >&2; exit 3; }
10tmp=$(mktemp -d)
11trap 'rm -rf "$tmp"' EXIT HUP INT TERM
12nice -n 19 ionice -c3 "$omc" < om/support-page/support.om > "$tmp/render"
13chmod +x "$tmp/render"
14for n in 1 2; do
15 nice -n 19 ionice -c3 "$tmp/render" > "$tmp/page.$n" 4> "$tmp/style.$n"
16done
17for f in page style; do
18 test -s "$tmp/$f.1"
19 cmp "$tmp/$f.1" "$tmp/$f.2"
20done
21if [ "${OMEGA_ACCEPT_CHANGE:-0}" = 1 ]; then
22 cp "$tmp/page.1" om/support-page/main.html
23 cp "$tmp/style.1" public/assets/support.css
24 sha256sum om/support-page/main.html > om/support-page/main.html.sha256
25 sha256sum public/assets/support.css > om/support-page/support.css.sha256
26fi
27cmp "$tmp/page.1" om/support-page/main.html
28cmp "$tmp/style.1" public/assets/support.css
29sha256sum -c om/support-page/main.html.sha256 om/support-page/support.css.sha256
30printf 'SUPPORT-ARTIFACTS PASS\n'