Update delink.sh for Windows

If you've cloned this repository on Windows, you have either a POSIX
environment or Git Bash and can run this script.  It just needs to call
the right headless Ghidra script depending on the OS (which it now tries
to do).
This commit is contained in:
KeybadeBlox 2025-12-14 23:55:08 -05:00
parent 8e62579f34
commit 87c56f01d6
2 changed files with 9 additions and 4 deletions

View file

@ -50,7 +50,13 @@ delink() {
# $3: Ghidra project name
# $4: Whitespace-separated address ranges to include in object
# $5: Output path (inside /target)
"$1/support/analyzeHeadless" "$2" "$3"\
# Call the right script depending on whether we're on Windows
# (this seems like the most reliable method I can find for POSIX sh)
if [ -n "$WINDIR" ]; then suffix=.bat
else suffix=
fi
"$1/support/analyzeHeadless$suffix" "$2" "$3"\
-process default.xbe\
-noanalysis\
-postScript DelinkProgram.java\