#!/usr/bin/env bash
set -euo pipefail

# Load system-level .env for scaffolding and global paths.
# Assumes system .env is at /Users/rbutare/dev/.env

SYSTEM_ENV_FILE="/Users/rbutare/dev/.env"

if [ ! -f "$SYSTEM_ENV_FILE" ]; then
  echo "ERROR: system .env not found at $SYSTEM_ENV_FILE" >&2
  exit 1
fi

set -a
. "$SYSTEM_ENV_FILE"
set +a

: "${ROOT:?ROOT must be set in system .env}"
: "${SYSTEM_ROOT:?SYSTEM_ROOT must be set in system .env}"
: "${PROJECT_ROOT:?PROJECT_ROOT must be set in system .env}"
: "${DEPLOY_ROOT:?DEPLOY_ROOT must be set in system .env}"
