#!/bin/bash # brpull.sh DEST — copy every new screenshot out of the browser LXC into DEST, then empty /root/shots there. set -euo pipefail; mkdir -p "$1" ssh demo-hp "LC_ALL=C pct exec ${BR_CT:-9361} -- tar cf - -C /root/shots ." | tar xf - -C "$1" ssh demo-hp "LC_ALL=C pct exec ${BR_CT:-9361} -- find /root/shots -type f -delete" ls "$1" | wc -l