#!/bin/bash # The shared `spr` kind cluster [up|down|status] (default status). # # Usage: # ./ctrl/cluster.sh up # create the cluster (no-op if it exists) # ./ctrl/cluster.sh down # delete it (drops every room's namespace) # ./ctrl/cluster.sh status # what's running on it # # One target, one script — the variants live here. The kind-*.sh files stay # exactly as they are and remain runnable on their own; this only dispatches. set -e SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" case "${1:-status}" in up) exec "$SCRIPT_DIR/kind-up.sh" ;; down) exec "$SCRIPT_DIR/kind-down.sh" ;; status) exec "$SCRIPT_DIR/kind-status.sh" ;; *) echo "Unknown subcommand: $1" >&2 echo "Usage: cluster.sh [up|down|status]" >&2 exit 1 ;; esac