a2d/res/util.sh

16 lines
347 B
Bash
Raw Normal View History

2018-11-26 05:16:39 +00:00
function cecho {
case $1 in
2019-01-05 04:03:59 +00:00
red) tput setaf 1 ; shift ;;
green) tput setaf 2 ; shift ;;
yellow) tput setaf 3 ; shift ;;
2018-11-26 05:16:39 +00:00
esac
2019-01-05 04:03:59 +00:00
echo -e "$@"
2018-11-26 05:16:39 +00:00
tput sgr0
}
function do_make {
make $MAKE_FLAGS "$1" \
&& (cecho green "make $1 good") \
|| (tput blink ; cecho red "MAKE $1 BAD" ; return 1)
}