pve-gui-sensors-auto/install.sh
2026-08-01 19:37:20 +01:00

17 lines
424 B
Bash
Executable File

#!/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"