#!/usr/bin/env bash # ============================================================================== # PARA TARGET CONTROLS # Comment out (#) any directory to completely deactivate it from the sweep. # ============================================================================== TARGETS=( "$HOME/ExoKortex/1-Projects" "$HOME/ExoKortex/2-Areas" # "$HOME/ExoKortex/3-Resources" # "$HOME/ExoKortex/4-Archives/" ) # Protect against empty arrays if all targets get disabled if [ ${#TARGETS[@]} -eq 0 ]; then echo "Drop execution: No active PARA targets configured." exit 0 fi # Execute strict structural scanning on active paths only find "${TARGETS[@]}" -mindepth 2 -maxdepth 2 -type d -name ".git" | while read -r gitdir; do repo_dir=$(dirname "$gitdir") cd "$repo_dir" if [ -n "$(git status --porcelain)" ]; then git add . git commit -m "System: Automated background sweep $(date +'%Y-%m-%d %H:%M')" fi done