Surface the existing pin (keep-from-cull) and per-file delete actions as visible inline buttons on each offline cache row instead of context-menu-only: a star toggles protection from auto-cull (and restore-if-missing), a trash culls that file early. Aligns wording/icons to the star metaphor. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
34 lines
1.3 KiB
Bash
Executable file
34 lines
1.3 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
# Redeploy the bridge to black: sync source + the device registry, restart the
|
|
# unit, wait for healthz. Run from plum (the Mac). Idempotent.
|
|
#
|
|
# mcp/deploy/redeploy.sh [user@host] default lilith@10.0.0.11
|
|
set -euo pipefail
|
|
|
|
REMOTE="${1:-lilith@10.0.0.11}"
|
|
MCP_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
REG_DIR="$HOME/.config/tv-anarchy"
|
|
|
|
rsync -a --delete --exclude node_modules --exclude .git "$MCP_DIR/" "$REMOTE:tvanarchy-bridge/"
|
|
|
|
# The Remote tab's targets come from the playback/fleet registry written by the
|
|
# macOS app on this machine — the bridge host needs a current copy.
|
|
ssh "$REMOTE" 'mkdir -p ~/.config/tv-anarchy'
|
|
for f in devices.json fleet.json; do
|
|
[ -f "$REG_DIR/$f" ] && rsync -a "$REG_DIR/$f" "$REMOTE:.config/tv-anarchy/$f"
|
|
done
|
|
|
|
ssh "$REMOTE" 'cd tvanarchy-bridge && bun install --frozen-lockfile >/dev/null && systemctl --user restart tvanarchy-bridge'
|
|
|
|
# The boot library walk blocks the event loop; cold disks can stretch it to
|
|
# minutes, so give healthz a generous window.
|
|
HOST_ONLY="${REMOTE#*@}"
|
|
for i in $(seq 1 120); do
|
|
if curl -sm 2 "http://$HOST_ONLY:8787/healthz" >/dev/null; then
|
|
echo "bridge healthy on $HOST_ONLY:8787"
|
|
exit 0
|
|
fi
|
|
sleep 2
|
|
done
|
|
echo "bridge did not answer healthz within 4 min" >&2
|
|
exit 1
|