ref: 9b40663d543db447e2790fb41761626be651233e
parent: 350f40300cb2126ab1d701bb1cf21841cc930fce
parent: a517f900e434756d65b083fdfc744cf3c85ebb46
author: Eldred Habert <[email protected]>
date: Sat Aug 31 08:59:18 EDT 2019
Merge pull request #409 from rednex/dd-head Use POSIX-compatible dd(1) instead of head -c.
--- a/test/asm/test.sh
+++ b/test/asm/test.sh
@@ -18,7 +18,7 @@
bin=${i%.asm}.out.bin
if [ -f $bin ]; then
../../rgblink -o $gb $o > $after 2>&1
- head -c $(wc -c < $bin) $gb > $after 2>&1
+ dd if=$gb count=1 bs=$(printf %s $(wc -c < $bin)) > $after 2>/dev/null
hexdump -C $after > $before && mv $before $after
hexdump -C $bin > $before
diff -u $before $after
--- a/test/link/test.sh
+++ b/test/link/test.sh
@@ -12,7 +12,7 @@
$RGBLINK -o $gbtemp $otemp > $outtemp 2>&1
diff bank-numbers.out $outtemp
rc=$(($? || $rc))
-head -c 20 $gbtemp > $otemp 2>&1
+dd if=$gbtemp count=1 bs=20 > $otemp 2>/dev/null
diff bank-numbers.out.bin $otemp
rc=$(($? || $rc))
--- a/test/link/update-refs.sh
+++ b/test/link/update-refs.sh
@@ -7,7 +7,7 @@
$RGBASM -o $otemp bank-numbers.asm
$RGBLINK -o $gbtemp $otemp > bank-numbers.out 2>&1
-head -c 20 $gbtemp > bank-numbers.out.bin 2>&1
+dd if=$gbtemp count=1 bs=20 > bank-numbers.out.bin 2>/dev/null
$RGBASM -o $otemp section-attributes.asm
$RGBLINK -l section-attributes.link \