ia_dev/git-issues/agent-loop-stop-requested.sh
Nicolas Cantu e86a9fbb6e refactor: rename gitea-issues to git-issues and symlink projects to monorepo
- Rename directory and scripts env GIT_ISSUES_DIR; secrets path .secrets/git-issues
- Rename agent git-issues-process; update docs GIT_ISSUES_SCRIPTS_AGENTS.md
- Symlink projects/enso, smart_ide, builazoo to ../../projects/<id> when used inside smart_ide
- Update project conf paths for git-issues tokens and imap bridge
2026-04-03 19:05:28 +02:00

28 lines
854 B
Bash
Executable File

#!/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