4bb64a8ca3
- ticker / QR ad overlay / break slide graphics (1920×1080) with all geometry derived from one shared module (src/shared/obs-geometry.mjs) - OBS scene-collection generator (scripts/generate-obs-scenes.mjs) and a read-only in-dashboard setup verifier, both driven by the same module - en/sr dashboard i18n selected via bundle config; configschema.json with neutral first-run defaults seeded from optional branding config - install.sh / systemd user service / update.sh for venue deployment - reference OBS scene collection + profile from a real venue as fixtures
35 lines
1.1 KiB
Bash
Executable File
35 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Update the bundle inside a NodeCG install created by install.sh:
|
|
# pull, reinstall deps, rebuild, and restart the service if one is running.
|
|
#
|
|
# Usage: ./update.sh [install-dir] (default: the install this script is in,
|
|
# falling back to ~/venue-gfx)
|
|
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
BUNDLE=nodecg-venue-gfx
|
|
UNIT_NAME=nodecg-venue-gfx.service
|
|
|
|
# scripts/ lives at <install>/bundles/<bundle>/scripts — walk up.
|
|
candidate="$(cd "$SCRIPT_DIR/../../.." && pwd)"
|
|
install_dir="${1:-$candidate}"
|
|
[[ -f $install_dir/index.js ]] || install_dir="$HOME/venue-gfx"
|
|
[[ -f $install_dir/index.js ]] || {
|
|
echo "no NodeCG install found (tried $candidate and ~/venue-gfx)" >&2
|
|
exit 1
|
|
}
|
|
|
|
bundle_dir="$install_dir/bundles/$BUNDLE"
|
|
|
|
echo "Updating $bundle_dir…"
|
|
git -C "$bundle_dir" pull --ff-only
|
|
(cd "$bundle_dir" && npm ci --no-audit --no-fund && npm run build)
|
|
|
|
if systemctl --user is-active --quiet "$UNIT_NAME" 2>/dev/null; then
|
|
echo "Restarting $UNIT_NAME…"
|
|
systemctl --user restart "$UNIT_NAME"
|
|
else
|
|
echo "Done. Restart NodeCG to load the new extension code."
|
|
fi
|