e5e179e541
Operator can run make bootstrap/install through S2 using nemohermes/openshell wrappers; docs and implement queue updated. No S3+ and no push.
30 lines
1.0 KiB
Bash
Executable File
30 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# scripts/install/s1-env.sh — S1: repo environment
|
|
#
|
|
# Creates .env from .env.example if needed, then validates required keys.
|
|
# Never commits real secrets.
|
|
#
|
|
# Usage:
|
|
# ./scripts/install/s1-env.sh
|
|
# (called by install.sh --stage s1)
|
|
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
# Source shared helpers (common.sh sets REPO_ROOT via git rev-parse)
|
|
# shellcheck source=../lib/common.sh
|
|
source "$SCRIPT_DIR/../lib/common.sh"
|
|
# shellcheck source=../lib/env.sh
|
|
source "$SCRIPT_DIR/../lib/env.sh"
|
|
|
|
log_section "S1: Repository environment"
|
|
|
|
# ── Create .env from example if needed ─────────────────────────────────────
|
|
create_env_from_example
|
|
|
|
# ── Validate ───────────────────────────────────────────────────────────────
|
|
validate_env
|
|
|
|
log_info "S1 complete: .env is valid."
|