Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-gpu-driver/blob/main/tools/getomc.sh # omega-gpu-driver aien-dev/omega-gpu-driver Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-gpu-driver / tools / getomc.sh` 18 lines ยท 937 bytes Raw Blame History 1 #!/bin/sh 2 # getomc.sh -- make build/omc: birth the pinned Omega compiler from seed-0 in a clean checkout 3 # of omega-mv at OMEGA_COMMIT, then refuse it unless its sha256 is OMC_SHA256. 4 # Reuses $AIEN_OMC when it already has the pinned hash. 5 set -eu 6 R=$(CDPATH= cd -- "$(dirname "$0")/.." && pwd) 7 . "$R/tools/omc.pin" 8 mkdir -p "$R/build" 9 ok() { [ -x "$1" ] && [ "$(sha256sum "$1" | cut -d' ' -f1)" = "$OMC_SHA256" ]; } 10 if ok "$R/build/omc"; then exit 0; fi 11 if [ -n "${AIEN_OMC:-}" ] && ok "$AIEN_OMC"; then cp "$AIEN_OMC" "$R/build/omc"; exit 0; fi 12 S="$R/build/omega-src" 13 if [ ! -d "$S/.git" ]; then git clone -q "$OMEGA_REPO" "$S"; fi 14 git -C "$S" fetch -q origin "$OMEGA_COMMIT" 2>/dev/null || git -C "$S" fetch -q origin 15 git -C "$S" checkout -q --detach "$OMEGA_COMMIT" 16 (cd "$S" && sh seed/omega-from-seed.sh >/dev/null) 17 ok "$S/seed/out/omc" || { echo "getomc: omc hash is not the pin" >&2; exit 1; } 18 cp "$S/seed/out/omc" "$R/build/omc"