#!/bin/bash
# system/scripts/audit-scripts.sh

ROOT=$(realpath "$(dirname "${BASH_SOURCE[0]}")/../..")

echo "--- Auditing Script Integrity ---"
find "$ROOT" -name "*.sh" -not -path "*/OLD/*" | while read -r script; do
    if ! grep -q "env-init.sh" "$script"; then
        echo "[MISSING SOURCE] $script needs to be updated."
    else
        echo "[OK] $script"
    fi
done
