#!/usr/bin/env bash # ============================================================================= # fvc_env.sh — shared environment and path resolution for scripts/*.sh # ============================================================================= # Source this at the top of any driver script, immediately after `set -euo # pipefail`: # # source "$(dirname "${BASH_SOURCE[0]}")/lib/fvc_env.sh" # # It provides: # # FVC_REPO_ROOT absolute path to the repository checkout # PYTHON_BIN the interpreter to run project code with # FVC_ROOT_ every root from configs/paths.yaml (DATA, QGIS, UAS, ...) # FVC_SITE_ every site from configs/paths.yaml (SITE1, SITE2, ...) # fvc_layout resolve a layout template, e.g. # fvc_layout predictors site=site1 grid=3072 # fvc_require_dir assert a directory exists, with an actionable message # # Roots come from configs/paths.yaml, so the shell scripts and the Python code # read the same declarations. Override any of them per run: # # FVC_DATA_ROOT=/mnt/disk/calperumResearch bash scripts/