-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-report.sh
More file actions
executable file
·38 lines (32 loc) · 1.03 KB
/
Copy pathrun-report.sh
File metadata and controls
executable file
·38 lines (32 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env bash
# Runs phase0.py and saves both a readable report and a JSON dump into
# ./reports/. Safe to use as a Steam shortcut target — Steam gives us no
# visible terminal, so everything is captured to disk.
#
# Auto-names the output by which world it detected itself in, so you can't
# mix up the Steam-Input-on and Steam-Input-off runs.
set -uo pipefail
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
OUT="$DIR/reports"
mkdir -p "$OUT"
if [ -n "${1:-}" ]; then
TAG="$1"
elif [ -n "${SDL_GAMECONTROLLER_IGNORE_DEVICES:-}" ]; then
TAG="steam-input-ON"
elif [ -n "${SteamAppId:-}${STEAM_COMPAT_CLIENT_INSTALL_PATH:-}" ]; then
TAG="steam-input-OFF"
else
TAG="desktop-baseline"
fi
STAMP="$(date +%Y%m%d-%H%M%S)"
BASE="$OUT/$TAG-$STAMP"
python3 "$DIR/phase0.py" --json "$BASE.json" 2>&1 | tee "$BASE.txt"
echo
echo "Saved:"
echo " $BASE.txt"
echo " $BASE.json"
# When launched from Steam there's no terminal to read; pause only if there is.
if [ -t 0 ]; then
echo
read -r -p "Press Enter to close..." _
fi