Files
steam/tools/decompile_list.sh

16 lines
757 B
Bash
Executable File

#!/usr/bin/env bash
# Run tools/decompile.sh over every binary in a list file (paths under client/),
# one at a time, skipping binaries that already have output so re-runs resume.
# Usage: tools/decompile_list.sh <list-file> (resource knobs: tools/ghidra-env.sh)
set -uo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
LOG="$ROOT/decomp/logs/queue.out"
while read -r bin; do
[ -n "$bin" ] || continue
name="$(basename "$(dirname "$bin")")_$(basename "$bin")"
[ -f "$ROOT/decomp/$name/functions.tsv" ] && continue
rm -f "$ROOT/ghidra_projects/$name.lock" "$ROOT/ghidra_projects/$name.lock~"
"$ROOT/tools/decompile.sh" "$ROOT/$bin" >> "$ROOT/decomp/logs/$(basename "$1" .txt).out" 2>&1
echo "$bin rc=$? $(date '+%F %T')" >> "$LOG"
done < "$1"