cat / goq
clone

turns a linux box into a private steam streaming appliance: plug in, tap your key, play from another computer

fix/architecture-review-findings
goq / scripts / run-linux-cross-build-gate.sh
run-linux-cross-build-gate.sh 1.7K executable
1#!/usr/bin/env bash2set -euo pipefail34case "${GOQ_VERIFY_IN_PROCESS_GSTREAMER:-0}" in5 0|1) ;;6 *)7 printf 'GOQ_VERIFY_IN_PROCESS_GSTREAMER must be 0 or 1\n' >&28 exit 19 ;;10esac1112case "${GOQ_REQUIRE_LINUX_CROSS_BUILD:-0}" in13 0|1) ;;14 *)15 printf 'GOQ_REQUIRE_LINUX_CROSS_BUILD must be 0 or 1\n' >&216 exit 117 ;;18esac1920require_cross_commands() {21 local cross_command2223 for cross_command in cargo-zigbuild zig; do24 if ! command -v "$cross_command" >/dev/null 2>&1; then25 printf 'required Linux cross-build command is missing at build time: %s\n' \26 "$cross_command" >&227 exit 128 fi29 done30}3132run_cross_build() {33 # Re-check at the point of use. The complete repository gate may spend34 # several minutes on native tests after its initial tool preflight.35 require_cross_commands3637 if [[ "${GOQ_VERIFY_IN_PROCESS_GSTREAMER:-0}" == 1 ]]; then38 # Zig intentionally omits the host's default system-library paths for an39 # explicit target. Preserve pkg-config's system -L entries so the dynamic40 # GStreamer/GLib development libraries remain linkable without an rpath.41 PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \42 cargo zigbuild --locked -p sigil-host --bins \43 --target x86_64-unknown-linux-gnu.2.17 --features in-process-gstreamer44 else45 cargo zigbuild --locked -p sigil-host --bins \46 --target x86_64-unknown-linux-gnu.2.1747 fi48 echo 'linux_cross_build=ok'49}5051if [[ "${GOQ_REQUIRE_LINUX_CROSS_BUILD:-0}" == 1 ]]; then52 run_cross_build53elif command -v cargo-zigbuild >/dev/null 2>&1 \54 && command -v zig >/dev/null 2>&1; then55 run_cross_build56else57 echo 'linux_cross_build=skipped (cargo-zigbuild and zig are both required)'58fi