forked from
anil.recoil.org/monopam-myspace
My aggregated monorepo of OCaml code, automaintained
1#!/bin/bash
2# Build and serve the full jon.recoil.org site.
3#
4# This is a convenience wrapper around build-site.sh that defaults to
5# serving on port 8080 after building.
6#
7# Usage:
8# ./deploy-site.sh # build everything and serve on port 8080
9# ./deploy-site.sh --no-serve # build only
10# ./deploy-site.sh --fresh # rebuild universes from scratch
11
12set -euo pipefail
13
14MONO=$(cd "$(dirname "$0")" && pwd)
15
16# Translate --no-serve → omit --serve; otherwise pass --serve plus any other flags.
17BUILD_ARGS=()
18SERVE=true
19for arg in "$@"; do
20 case "$arg" in
21 --no-serve) SERVE=false ;;
22 *) BUILD_ARGS+=("$arg") ;;
23 esac
24done
25
26if $SERVE; then
27 BUILD_ARGS+=("--serve")
28fi
29
30exec "$MONO/build-site.sh" "${BUILD_ARGS[@]}"