#!/usr/bin/env bash set -euo pipefail REPO="${REPO:-JamieRalph/pve-gui-sensors-auto}" API="https://api.github.com/repos/$REPO/releases/latest" URL="$(curl -fsSL "$API" | grep -o 'https://[^" ]*_all\.deb' | head -n1)" if [[ -z "$URL" ]]; then echo "Could not find a .deb asset in the latest release." >&2 exit 1 fi TMP="$(mktemp --suffix=.deb)" trap 'rm -f "$TMP"' EXIT curl -fL "$URL" -o "$TMP" apt install -y "$TMP"