ba-auto-daily/pull_logs.sh
Nik Afiq 027e55f7a9 fix(cafe): Resolve timing gap causing rank-up cutscene to freeze game during cron run
feat(logs): Add script to pull cron run logs from remote for local reading
2026-07-16 23:31:33 +09:00

24 lines
782 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
# Pulls ~/ba_logs/ (cron run logs -- daily.log, q4h.log, etc., see
# ba_cron_run.sh and CLAUDE.md's "Scheduled runs (cron)" section) from
# nik-gpu into this repo's scratchpad/ba_logs/ for local reading (e.g. in
# VS Code). Local dev tooling only, not part of the ba_dailies.sh
# game-automation launcher -- same category as setup.sh/clean_scratchpad.sh.
# Read-only on the remote side: never writes back to nik-gpu.
#
# Usage:
# ./pull_logs.sh [host]
#
# host defaults to nik-gpu (the ssh alias used throughout this project).
HOST="${1:-nik-gpu}"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
DEST="$SCRIPT_DIR/scratchpad/ba_logs"
mkdir -p "$DEST"
rsync -av "$HOST:ba_logs/" "$DEST/"
echo "Synced $HOST:~/ba_logs/ -> $DEST"