#!/usr/bin/env bash # Exit 0 if agent-loop.stop exists (stop requested), 1 otherwise. Used at start of each cycle. # Run from repo root. # # Usage: # Depuis la racine de ia_dev : ./git-issues/agent-loop-stop-requested.sh # set -euo pipefail if [ -n "${HOME:-}" ] && [ -r "$HOME/.bashrc" ]; then set +u # shellcheck source=/dev/null source "$HOME/.bashrc" 2>/dev/null || true set -u fi GIT_ISSUES_DIR="${GIT_ISSUES_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" ROOT="$(cd "${GIT_ISSUES_DIR}/../.." && pwd)" export GIT_ISSUES_DIR export REPO_ROOT="${ROOT}" cd "$ROOT" # shellcheck source=lib.sh source "${GIT_ISSUES_DIR}/lib.sh" 2>/dev/null || true LOGS_GIT_ISSUES="${PROJECT_LOGS_DIR:-$ROOT/logs}/git-issues" STOP_FILE="${AGENT_LOOP_STOP_FILE:-$LOGS_GIT_ISSUES/agent-loop.stop}" [ -f "$STOP_FILE" ] # exit 0 if file exists, 1 otherwise