a2d/desk.acc/res/go.sh

52 lines
1004 B
Bash
Raw Normal View History

2017-08-29 03:58:09 +00:00
#!/bin/bash
set -e
2018-02-19 18:49:45 +00:00
function cecho {
case $1 in
red) tput setaf 1 ;;
green) tput setaf 2 ;;
yellow) tput setaf 3 ;;
esac
echo -e "$2"
tput sgr0
}
2017-09-07 04:33:22 +00:00
function do_make {
make "$1" \
2018-02-19 18:49:45 +00:00
&& (cecho green "make $1 good") \
|| (tput blink ; cecho red "MAKE $1 BAD" ; return 1)
2017-09-07 04:33:22 +00:00
}
2017-08-29 03:58:09 +00:00
function verify {
diff "orig/$1.bin" "$1.F1" \
2018-02-19 18:49:45 +00:00
&& (cecho green "diff $1 good" ) \
|| (tput blink ; cecho red "DIFF $1 BAD" ; return 1)
}
function stats {
2018-02-01 18:00:17 +00:00
echo "$1: "$(../res/stats.pl < "$1")
}
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
echo "Verifying diffs:"
verify "calculator"
verify "show_text_file"
verify "date"
verify "puzzle"
2017-08-29 03:58:09 +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 \
&& echo "Updated mountable file (SIF)"
2018-02-19 18:49:45 +00:00
#cat calc_fixed.F1 > mount/TEST.\$F1 \
# && echo "Updated mountable file (Test)"