--instance NAME on the shell entry points through scripts/instance.sh;
per-instance config, data root and marker, units, wrapper and ports;
the claim checks in mosaic-config.mjs; the guard protects every
instance's config and data root. Brief blob 4e8f1e0528, design
agents/darkwing/work/queue-190/DESIGN.md rev 3 (Filbert approved).
14 lines
594 B
Bash
Executable File
14 lines
594 B
Bash
Executable File
#!/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 "$@"
|