interplane.Get Omega
Read in your language

omega-packages

aien-dev/omega-packages

Brought by drakestapleton

branch main Branches Tags History

omega-packages / scripts / check-pins.sh

31 lines · 1576 bytes Raw Blame History
1#!/bin/sh
2# check-pins.sh -- every recipe must carry the pins in pins.env. Prints one line per check;
3# exit 0 when all agree, 1 on any mismatch. (The Homebrew tap lives in aien-dev/homebrew-omega and
4# has its own copy of this check.)
5set -eu
6here=$(CDPATH= cd -- "$(dirname "$0")/.." && pwd)
7cd "$here"
8. ./pins.env
9bad=0
10need() { # file needle label
11 if grep -qF -- "$2" "$1"; then echo "ok $1 $3"; else echo "FAIL $1 lacks $3 ($2)"; bad=1; fi
12}
13for f in flake.nix guix/aien/omega.scm aur/PKGBUILD aur/.SRCINFO docker/Dockerfile; do
14 need "$f" "$OMEGA_MV_COMMIT" commit
15done
16for f in flake.nix guix/aien/omega.scm aur/PKGBUILD docker/Dockerfile; do
17 need "$f" "$OMC_SHA256" omc-sha256
18done
19need aur/PKGBUILD "$OMEGA_MV_TARBALL_SHA256" archive-sha256
20need aur/.SRCINFO "$OMEGA_MV_TARBALL_SHA256" archive-sha256
21need docker/Dockerfile "$OMEGA_MV_TARBALL_SHA256" archive-sha256
22need aur/PKGBUILD "pkgver=$OMC_VERSION" version
23need aur/.SRCINFO "pkgver = $OMC_VERSION" version
24# flake.nix carries the archive hash as SRI and guix as nix-base32; both encode the same 32 bytes.
25need flake.nix "sha256-xiG2zv5yjWeholOp2JkUlUBkYNNl3ZHqNWRR6yJUqVw=" archive-sri
26need guix/aien/omega.scm "0p59ahifnlb46pm93pb5sdh68h4m2jcxiaaklahng3bjzv7bc8f6" archive-nix32
27sri=$(printf '%s' "$OMEGA_MV_TARBALL_SHA256" | xxd -r -p | base64)
28[ "sha256-$sri" = "sha256-xiG2zv5yjWeholOp2JkUlUBkYNNl3ZHqNWRR6yJUqVw=" ] \
29 && echo "ok archive-sri decodes to pins.env OMEGA_MV_TARBALL_SHA256" \
30 || { echo "FAIL archive-sri does not decode to pins.env OMEGA_MV_TARBALL_SHA256"; bad=1; }
31exit $bad