a2d/desktop/res/go.sh

46 lines
833 B
Bash
Raw Normal View History

2018-02-01 18:00:17 +00:00
#!/bin/bash
set -e
2018-02-19 18:53:58 +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
}
2018-02-01 18:00:17 +00:00
function do_make {
make "$1" \
2018-02-19 18:53:58 +00:00
&& (cecho green "make $1 good") \
|| (tput blink ; cecho red "MAKE $1 BAD" ; return 1)
2018-02-01 18:00:17 +00:00
}
function verify {
2018-02-21 16:04:32 +00:00
diff "orig/DESKTOP2_$1" "out/$1.built" \
2018-02-19 18:53:58 +00:00
&& (cecho green "diff $1 good" ) \
|| (tput blink ; cecho red "DIFF $1 BAD" ; return 1)
2018-02-01 18:00:17 +00:00
}
function stats {
echo "$1: "$(../res/stats.pl < "$1")
}
#do_make clean
do_make all
2018-02-22 03:20:13 +00:00
TARGETS="loader mgtk desktop invoker ovl1 ovl1a ovl5 ovl6 ovl7"
2018-02-01 18:00:17 +00:00
# Verify original and output match
echo "Verifying diffs:"
for t in $TARGETS; do
verify $t
done;
echo "Unidentified symbols:"
for t in $TARGETS; do
stats "$t.s"
done;