#!/usr/bin/env bash # Renders each stage of the match `make match` last played, from its command log, in # the capture container: captures/match_.png. Needs Docker and # build/match/match.tclog. Open the images and look at them. set -uo pipefail cd "$(dirname "${BASH_SOURCE[0]}")/.." if [[ ! -f build/match/match.tclog ]]; then echo "match-captures FAIL: no build/match/match.tclog; run 'make match' first" exit 1 fi status=0 for stage in lobby ship launch glide landed built final tide results; do if ! tools/capture.sh "match_$stage" "captures/match_$stage.png"; then echo "match-captures FAIL: stage $stage" status=1 fi done [[ "$status" -eq 0 ]] && echo "match-captures: ok (9 stages in captures/match_*.png)" exit "$status"