Files

8 lines
525 B
Bash
Executable File

#!/bin/bash
# Pull new bug reports from the VPS inbox and unpack them under /mnt/Games/@project/bug-reports/<id>/.
set -euo pipefail
H=$(cd "$(dirname "$0")" && pwd); R=/mnt/Games/@project/bug-reports; mkdir -p $R/raw
rsync -a --ignore-existing octo-vps:/srv/octo/reports/ $R/raw/
for f in $R/raw/*.octoreport; do [ -e "$f" ] || continue; id=$(basename "$f" .octoreport); [ -d $R/$id ] && continue
python3 -I $H/read_report.py "$f" $R/$id >/dev/null && cp "$R/raw/$id.meta" $R/$id/ 2>/dev/null; echo "new report $id"; done