2018-11-06 04:14:29 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-11-26 05:16:39 +00:00
|
|
|
# Run this from the desktop.system directory
|
2018-11-06 04:14:29 +00:00
|
|
|
|
2018-11-26 05:16:39 +00:00
|
|
|
set -e
|
|
|
|
source "../res/util.sh"
|
2018-11-06 04:14:29 +00:00
|
|
|
|
|
|
|
function verify {
|
|
|
|
diff "orig/$1" "out/$2" \
|
|
|
|
&& (cecho green "diff $2 good" ) \
|
|
|
|
|| (tput blink ; cecho red "DIFF $2 BAD" ; return 1)
|
|
|
|
}
|
|
|
|
|
|
|
|
function stats {
|
|
|
|
echo "$(printf '%-15s' $1)""$(../res/stats.pl < $1)"
|
|
|
|
}
|
|
|
|
|
|
|
|
#do_make clean
|
|
|
|
do_make all
|
|
|
|
|
|
|
|
SOURCES="desktop.system"
|
|
|
|
|
|
|
|
# Verify original and output match
|
|
|
|
echo "Verifying diffs:"
|
|
|
|
verify "DESKTOP.SYSTEM.SYS" "desktop.system.SYS"
|
|
|
|
|
|
|
|
# Compute stats
|
|
|
|
echo "Stats:"
|
|
|
|
for t in $SOURCES; do
|
|
|
|
stats "$t.s"
|
|
|
|
done;
|