mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
The linker script now allows you to assign a section with the same attributes as in the source. To do this, I've removed a check from AssignSectionAddressAndBankByName that would never be triggered, due to that condition being checked before. Shouldn't this and IsSectionSameTypeBankAndAttrs be condensed into a single function?
25 lines
479 B
Bash
Executable File
25 lines
479 B
Bash
Executable File
#!/bin/sh
|
|
o=$(mktemp)
|
|
gb=$(mktemp)
|
|
before=$(mktemp)
|
|
after=$(mktemp)
|
|
rc=0
|
|
|
|
for i in *.asm; do
|
|
../../rgbasm -o $o $i > $after 2>&1
|
|
diff -u ${i%.asm}.out $after
|
|
rc=$(($? || $rc))
|
|
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
|
|
hexdump -C $after > $before && mv $before $after
|
|
hexdump -C $bin > $before
|
|
diff -u $before $after
|
|
rc=$(($? || $rc))
|
|
fi
|
|
done
|
|
|
|
rm -f $o $gb $before $after
|
|
exit $rc
|