#!/usr/bin/env bash # Media (bare-ffmpeg) now ships in the default BridgeSwarm host. # This script re-extracts/codesigns addons for an existing ~/.bridgeswarm install # (same as repair:macos on Darwin). Kept so older docs still work. set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" echo "Note: media/ffmpeg is included in the default host — no separate media zip." echo "Re-extracting and signing native addons..." if [[ "$(uname -s)" == "Darwin" ]]; then exec bash "$SCRIPT_DIR/repair-macos-codesign.sh" fi INSTALL_DIR="${BRIDGE_SWARM_HOME:-$HOME/.bridgeswarm}" LAUNCHER="$INSTALL_DIR/run-bridge-swarm-host.sh" HOST_BIN="$INSTALL_DIR/bridge-swarm-host" if [[ ! -x "$HOST_BIN" ]]; then echo "No host at $HOST_BIN — run scripts/install.sh (or build:dist) first." >&2 exit 1 fi mkdir -p "$INSTALL_DIR/tmp" if [[ -x "$LAUNCHER" ]]; then "$LAUNCHER" --extract-addons 2>/dev/null || true else "$HOST_BIN" --extract-addons 2>/dev/null || true fi echo "media" > "$INSTALL_DIR/capabilities.txt" echo "Done. Fully quit the browser and reload the extension."