Skip to content
Snippets Groups Projects
Commit 9f2d121d authored by Mot's avatar Mot
Browse files

Fix tr and dd for macOS

See Unix Stack Exchange question "Filling file with 0xFF gives C3BF in
OSX" at https://superuser.com/a/1349497/150212

and

https://lists.freebsd.org/pipermail/freebsd-questions/2007-October/160961.html
parent da956d90
No related branches found
No related tags found
No related merge requests found
Pipeline #1410 passed
......@@ -6,8 +6,8 @@ BIN1="$2"
BIN2="$3"
BINOUT="$4"
dd if=/dev/zero ibs=1k count=448 2>/dev/null | tr "\000" "\377" > "$BINOUT"
dd if=/dev/zero ibs=1k count=448 2>/dev/null | LANG=C tr "\000" "\377" > "$BINOUT"
dd if="$BIN1" of="$BINOUT" conv=notrunc 2>/dev/null
dd if="$BIN2" of="$BINOUT" conv=notrunc oflag=append 2>/dev/null
dd if="$BIN2" >> "$BINOUT" 2>/dev/null
"$PYTHON" "$(dirname "$0")/crc_patch.py" "$BINOUT"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment