Skip to content

Commit

Permalink
helper/bin2char: drop trailing empty line
Browse files Browse the repository at this point in the history
For unknown reasons, the coreutils tool 'od' on MacOS outputs an
extra empty line, which appears in the new auto-generated files.

Modify the script bin2char.sh to drop every empty line.

Change-Id: Id835fecadb58ad4ddfc11ef9f9a2e8d75c5dffe9
Signed-off-by: Antonio Borneo <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/8051
Reviewed-by: Erhan Kurubas <[email protected]>
Tested-by: jenkins
Reviewed-by: Henrik Nordström <[email protected]>
  • Loading branch information
borneoa committed Dec 24, 2023
1 parent 4948974 commit 492dc7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helper/bin2char.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
}

echo "/* Autogenerated with $0 */"
od -v -A n -t x1 | sed 's/ *\(..\) */0x\1,/g'
od -v -A n -t x1 | sed 's/ *\(..\) */0x\1,/g;/^$/d'

0 comments on commit 492dc7c

Please sign in to comment.