interplane.Get Omega
Read in your language

spark-connector

aien-dev/spark-connector

Brought by drakestapleton

branch main Branches Tags History

spark-connector / dist.sh

24 lines · 1242 bytes Raw Blame History
1#!/bin/sh
2# Make the files the hub serves under /community/ (copy them to <community store>/dist/ to deploy):
3# interplane-runner-<sha256>, omc-<sha256> (the job compiler, the salvage pin), join.sh (written by
4# runner/joingen.om for HUB), SHA256SUMS.
5# OMEGA_SRC=... JOB_OMC=/path/to/omc(3ad9f10f...) ./dist.sh HUB OUTDIR
6# Build glue only: compose, compile, copy, hash.
7set -eu
8cd "$(dirname "$0")"
9hub=${1:?usage: dist.sh HUB OUTDIR}; out=${2:?usage: dist.sh HUB OUTDIR}
10JPIN=3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194
11OMEGA_SRC=${OMEGA_SRC:-../omega-mv}
12JOB_OMC=${JOB_OMC:-$HOME/work/flux/omega-mv/seed/out/omc}
13[ "$(sha256sum < "$JOB_OMC" | cut -d' ' -f1)" = "$JPIN" ] || { echo "dist.sh: $JOB_OMC is not the job compiler pin $JPIN" >&2; exit 2; }
14./build.sh > /dev/null
15OMC=$OMEGA_SRC/seed/out/omc
16{ printf 'om2\n'; cat runner/joingen.om; } | "$OMC" > build/joingen
17chmod +x build/joingen
18mkdir -p "$out"
19rs=$(sha256sum < build/interplane-runner | cut -d' ' -f1)
20cp build/interplane-runner "$out/interplane-runner-$rs"
21cp "$JOB_OMC" "$out/omc-$JPIN"
22build/joingen "$hub" "$rs" "$JPIN" > "$out/join.sh"
23( cd "$out" && sha256sum "interplane-runner-$rs" "omc-$JPIN" join.sh > SHA256SUMS )
24cat "$out/SHA256SUMS"