a2d/desk.acc/res/go.sh

36 lines
646 B
Bash
Raw Normal View History

2017-08-29 03:58:09 +00:00
#!/bin/bash
# Run this from the desk.acc directory
2017-08-29 03:58:09 +00:00
set -e
2018-11-26 05:16:39 +00:00
source "../res/util.sh"
2017-08-29 03:58:09 +00:00
function verify {
diff "orig/$1.bin" "out/$1.built" \
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-03-06 05:20:00 +00:00
echo "$(printf '%-20s' $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"
2018-02-22 05:18:46 +00:00
verify "show.text.file"
verify "date"
verify "puzzle"
verify "sort.directory"
2017-08-29 03:58:09 +00:00
2018-02-22 05:18:46 +00:00
# Compute stats
2018-03-06 05:20:00 +00:00
echo "Stats:"
stats "calculator.s"
2018-02-22 05:18:46 +00:00
stats "show.text.file.s"
stats "date.s"
stats "puzzle.s"
stats "sort.directory.s"