#!/usr/bin/env bash # Mirror the player reports, the keeper's replies and the players' screenshots # to a local folder, and write a digest beside them for reading. Run from the # repository root: # deploy/pull-reports.sh [host] [folder] (default ~/Desktop/hnefatafl-reports) set -euo pipefail HOST="${1:-209.97.148.244}" OUT="${2:-$HOME/Desktop/hnefatafl-reports}" mkdir -p "$OUT/images" scp -q "root@$HOST:/var/lib/hnefatafl/feedback.jsonl" "$OUT/feedback.jsonl" 2>/dev/null || : > "$OUT/feedback.jsonl" rsync -aq "root@$HOST:/var/lib/hnefatafl/feedback-images/" "$OUT/images/" 2>/dev/null || true npx tsx deploy/report-digest.ts "$OUT"