adding OBS support

This commit is contained in:
lwoodard
2026-04-16 15:23:46 -06:00
parent ae1ab88d4a
commit 6f2290bd6c
5 changed files with 326 additions and 23 deletions

View File

@@ -219,6 +219,46 @@ else
exit 1
fi
fi
# obs-cmd (optional — required for OBS module)
if command -v obs-cmd &>/dev/null; then
ok "obs-cmd found"
else
info "obs-cmd not found (required for OBS Studio module)"
if prompt_yn "Install obs-cmd now?" "y"; then
OBS_CMD_VERSION=$(curl -sL "https://api.github.com/repos/grigio/obs-cmd/releases/latest" | grep '"tag_name"' | head -1 | sed 's/.*"v\(.*\)".*/\1/')
if [[ -z "$OBS_CMD_VERSION" ]]; then
warn "Could not fetch obs-cmd release — install manually: cargo install obs-cmd"
elif $IS_MAC; then
# Detect architecture — Apple Silicon vs Intel
ARCH="$(uname -m)"
if [[ "$ARCH" == "arm64" ]]; then
OBS_CMD_ASSET="obs-cmd-arm64-macos.tar.gz"
else
OBS_CMD_ASSET="obs-cmd-x64-macos.tar.gz"
fi
step "Downloading obs-cmd v${OBS_CMD_VERSION} (${ARCH})..."
curl -sL "https://github.com/grigio/obs-cmd/releases/download/v${OBS_CMD_VERSION}/${OBS_CMD_ASSET}" \
| tar xz -C /tmp
install -m 755 /tmp/obs-cmd /usr/local/bin/obs-cmd
rm -f /tmp/obs-cmd
else
# Linux — x86_64 musl static binary
step "Downloading obs-cmd v${OBS_CMD_VERSION}..."
curl -sL "https://github.com/grigio/obs-cmd/releases/download/v${OBS_CMD_VERSION}/obs-cmd-v${OBS_CMD_VERSION}-x86_64-unknown-linux-musl.tar.gz" \
| tar xz -C /tmp
sudo install -m 755 /tmp/obs-cmd /usr/local/bin/obs-cmd
rm -f /tmp/obs-cmd
fi
if command -v obs-cmd &>/dev/null; then
ok "obs-cmd installed"
else
warn "obs-cmd install may have failed — OBS module won't work until it's available"
fi
else
info "Skipped — OBS module will not work until obs-cmd is installed"
fi
fi
nl
# ── 2. Build ───────────────────────────────────────────────────────────────────
@@ -328,6 +368,13 @@ else
ok "config.yaml already exists — not overwritten"
fi
# Always install/update modules.yaml — this is a registry of available module
# definitions, not user data. User customisations go in config.yaml (params
# overrides per key). Keeping modules.yaml current ensures new modules (OBS,
# Slack, etc.) are available immediately after upgrade.
install -m 644 modules.example.yaml "${CONFIG_DIR}/modules.yaml"
ok "modules.yaml installed (updated to latest)"
# Copy bundled icons (never overwrite existing ones the user may have customised).
if [[ -d "icons" ]]; then
copied=0