#!/usr/bin/env bash
set -uo pipefail
cd /root/switch
T=$(awk -F'"' '/^SW_TOKEN=/{print $2; exit}' install-switch.sh)

echo "=== which suites actually exist ==="
for s in noble jammy bookworm trixie bullseye; do
  printf '%-10s %s\n' "$s" "$(curl -s -o /dev/null -w '%{http_code}' -u "signalwire:$T" \
    https://freeswitch.signalwire.com/repo/deb/debian-release/dists/$s/Release)"
done

echo
echo "=== real dependency failure (simulated, no changes) ==="
apt-get install -y -s freeswitch-meta-vanilla freeswitch-sounds-en-us-callie freeswitch-music-default 2>&1 | tail -40
