From 9b9a736d4c6176ca6703e1457482af22b03cf744 Mon Sep 17 00:00:00 2001 From: KeybadeBlox Date: Wed, 13 May 2026 20:17:32 -0400 Subject: [PATCH] Support DOS line endings in delink.sh DOS line endings in objects.csv, as one might encounter when cloning on Windows, would break the delinking script by adding an extra \r onto every line. The extra carriage return character is now removed. --- ghidra/delink.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ghidra/delink.sh b/ghidra/delink.sh index 6fab34e..65d0e32 100755 --- a/ghidra/delink.sh +++ b/ghidra/delink.sh @@ -21,7 +21,9 @@ main() { printf '=== Delinking object files into ../decompile/target/ ===\n' - while IFS= read -r line; do # Read objects.csv line by line + # Read objects.csv line by line (with EOL handling for Windows people) + CR=$(printf '\r') + while IFS=$CR read -r line; do # Split columns (col 1 in $1, col 2 in $2, etc.) set -f; IFS_PREV=$IFS; IFS=, set -- $line