Files
jellyfin-scene-search/scripts/update-all.sh
T
2026-10-07 11:01:43 +01:00

62 lines
1.4 KiB
Bash
Executable File

#!/usr/bin/env bash
set -Eeuo pipefail
source "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)/common.sh"
no_pull=false
skip_plugin=false
skip_docker=false
while [[ $# -gt 0 ]]; do
case "$1" in
--no-pull) no_pull=true ;;
--skip-plugin) skip_plugin=true ;;
--skip-docker) skip_docker=true ;;
-h|--help)
cat <<'EOF'
Usage: ./scripts/update-all.sh [options]
Update the checkout and deploy Scene Search.
Default sequence:
1. git pull --ff-only
2. build the Jellyfin plugin DLL
3. rebuild/start Docker services
4. install the DLL and restart Jellyfin
5. show status
Options:
--no-pull Skip git pull (useful immediately after you already pulled).
--skip-plugin Do not build/install/restart the Jellyfin plugin.
--skip-docker Do not rebuild/restart Docker.
EOF
exit 0
;;
*) die "Unknown option: $1" ;;
esac
shift
done
if ! "$no_pull"; then
need git
if [[ -n "$(git status --porcelain)" ]]; then
die "Working tree is not clean. Commit/stash local changes, or use --no-pull."
fi
banner "Updating repository"
git pull --ff-only
fi
if ! "$skip_plugin"; then
"$SCRIPT_DIR/plugin-rebuild.sh" --build-only
fi
if ! "$skip_docker"; then
"$SCRIPT_DIR/docker-rebuild.sh"
fi
if ! "$skip_plugin"; then
"$SCRIPT_DIR/plugin-rebuild.sh" --install-only
fi
"$SCRIPT_DIR/status.sh"