#!/usr/bin/env bash set -eu ORIGDIR=$PWD tmp=$(mktemp -d) cleanup() { rm -rf "$tmp" } trap cleanup EXIT export SDL_VIDEODRIVER=dummy export DOOMWADDIR=$PWD/extract $SOURCE_PORT -iwad miniwad.wad \ -mb 24 \ -nodraw -noblit -nosound -noautoload -nogui -nograbmouse \ -statdump $tmp/statdump.txt \ "$@" >$tmp/log.txt 2>&1 || true if [ ! -e $tmp/statdump.txt ]; then (echo "No statdump output produced."; cat $tmp/log.txt) >/dev/stderr exit 1 else cat $tmp/statdump.txt fi