helper script updates

This commit is contained in:
Joshua Bell 2018-02-19 10:53:58 -08:00
parent 69ff47b3cf
commit c9092abde5

View File

@ -2,16 +2,26 @@
set -e
function cecho {
case $1 in
red) tput setaf 1 ;;
green) tput setaf 2 ;;
yellow) tput setaf 3 ;;
esac
echo -e "$2"
tput sgr0
}
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)
&& (cecho green "make $1 good") \
|| (tput blink ; cecho red "MAKE $1 BAD" ; return 1)
}
function verify {
diff "orig/DESKTOP2_$1" "$1.built" \
&& (tput setaf 2 ; echo "diff $1 good" ; tput sgr0 ) \
|| (tput setaf 1 ; tput blink ; echo -e "DIFF $1 BAD" ; tput sgr0 ; return 1)
&& (cecho green "diff $1 good" ) \
|| (tput blink ; cecho red "DIFF $1 BAD" ; return 1)
}
function stats {