Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-25 08:29:08

0001 #!/bin/bash
0002 # Nightly update of epicdoc: git pull all doc source repos, then re-ingest.
0003 # Incremental mode — only re-embeds changed files.
0004 # Run via cron: 0 3 * * * /data/wenauseic/github/swf-monitor/scripts/update_epicdoc.sh
0005 
0006 set -euo pipefail
0007 
0008 GITHUB_DIR="/data/wenauseic/github"
0009 SCRIPT_DIR="$(dirname "$0")"
0010 LOG="/tmp/epicdoc_update.log"
0011 
0012 exec > "$LOG" 2>&1
0013 echo "=== epicdoc update $(date -u +%Y-%m-%dT%H:%M:%SZ) ==="
0014 
0015 # Repos referenced in ingest_docs.yaml
0016 REPOS=(
0017     swf-testbed
0018     swf-monitor
0019     swf-common-lib
0020     bamboo-mcp
0021     panda-bigmon-core
0022     eic.github.io
0023     epic-prod
0024     tutorial-file-access
0025     EICrecon
0026     containers
0027     epic
0028     afterburner
0029     eic-shell
0030 )
0031 
0032 # Git pull each repo
0033 for repo in "${REPOS[@]}"; do
0034     dir="$GITHUB_DIR/$repo"
0035     if [ -d "$dir/.git" ]; then
0036         echo "--- $repo"
0037         git -C "$dir" pull --ff-only 2>&1 || echo "  WARN: pull failed for $repo"
0038     else
0039         echo "--- $repo: not found, skipping"
0040     fi
0041 done
0042 
0043 # Activate venv and run incremental ingest
0044 echo "--- ingesting docs"
0045 source "$GITHUB_DIR/swf-testbed/.venv/bin/activate"
0046 source ~/.env
0047 python "$SCRIPT_DIR/ingest_docs.py" --config "$SCRIPT_DIR/ingest_docs.yaml"
0048 
0049 echo "=== done $(date -u +%Y-%m-%dT%H:%M:%SZ) ==="