#!/usr/bin/env bash set -euo pipefail ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" echo "Pulling latest changes from Gitea..." cd "$ROOT_DIR" git checkout -- package-lock.json 2>/dev/null || true git pull # setup.sh builds first and only then stops the old server, so the site # stays up during the build (and if the build fails). Pass --dev through. echo "Rebuilding and restarting via setup.sh..." exec "$ROOT_DIR/setup.sh" "$@"