2017-08-29 03:58:09 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2017-09-07 04:33:22 +00:00
|
|
|
function do_make {
|
|
|
|
make "$1" \
|
|
|
|
&& (tput setaf 2 ; echo "make $1 good" ; tput sgr0 ) \
|
|
|
|
|| (tput setaf 1 ; tput blink ; echo "MAKE $1 BAD" ; tput sgr0 ; return 1)
|
|
|
|
}
|
2017-08-29 03:58:09 +00:00
|
|
|
|
2017-09-06 01:41:13 +00:00
|
|
|
function verify {
|
2017-09-11 03:18:29 +00:00
|
|
|
diff "orig/$1.bin" "$1.F1" \
|
2017-09-07 04:33:22 +00:00
|
|
|
&& (tput setaf 2 ; echo "diff $1 good" ; tput sgr0 ) \
|
|
|
|
|| (tput setaf 1 ; tput blink ; echo -e "DIFF $1 BAD" ; tput sgr0 ; return 1)
|
2017-09-06 01:41:13 +00:00
|
|
|
}
|
|
|
|
|
2017-09-14 03:09:36 +00:00
|
|
|
function stats {
|
2018-02-01 18:00:17 +00:00
|
|
|
echo "$1: "$(../res/stats.pl < "$1")
|
2017-09-14 03:09:36 +00:00
|
|
|
}
|
|
|
|
|
2017-09-07 04:33:22 +00:00
|
|
|
#do_make clean
|
|
|
|
do_make all
|
|
|
|
|
2017-08-29 03:58:09 +00:00
|
|
|
# Verify original and output match
|
2017-09-14 03:09:36 +00:00
|
|
|
echo "Verifying diffs:"
|
2017-09-06 01:41:13 +00:00
|
|
|
verify "calculator"
|
|
|
|
verify "show_text_file"
|
2017-09-11 03:18:29 +00:00
|
|
|
verify "date"
|
|
|
|
verify "puzzle"
|
2017-08-29 03:58:09 +00:00
|
|
|
|
2017-09-14 03:09:36 +00:00
|
|
|
echo "Unidentified symbols:"
|
|
|
|
stats "calculator.s"
|
|
|
|
stats "show_text_file.s"
|
|
|
|
stats "date.s"
|
|
|
|
stats "puzzle.s"
|
|
|
|
|
2017-09-05 02:44:55 +00:00
|
|
|
cat show_image_file.F1 > mount/SHOW.IMAGE.FILE.\$F1 \
|
2017-09-21 02:54:19 +00:00
|
|
|
&& echo "Updated mountable file (SIF)"
|
|
|
|
|
|
|
|
cat calc_fixed.F1 > mount/TEST.\$F1 \
|
|
|
|
&& echo "Updated mountable file (Test)"
|