#!/usr/bin/env bash # Explicit, idempotent configuration bootstrap. # # Creates ~/.config/mosaic-dev/config.json (or $MOSAIC_CONFIG) only when # absent. An existing configuration is validated, never modified. # `--instance NAME` (row 190) creates ~/.config/mosaic-NAME/config.json # instead, with the data root ~/.mosaic-NAME claimed by its instance.json. # Normal run paths (build/hello/verify) deliberately do NOT auto-bootstrap: # missing configuration is an error there, not something to invent. set -euo pipefail cd "$(dirname "$0")/.." exec node scripts/mosaic-config.mjs bootstrap "$@"