use tput for colors

This commit is contained in:
josch 2010-08-27 11:45:32 +02:00
parent 41b8c3878d
commit d74863f310

View file

@ -257,15 +257,21 @@ print_exit_status () {
cols=\`expr \$cols - 8\`
if [ \$1 -ne 0 ]; then
tput cup \$lines \$cols
echo "\\033[1;31m[failed]\\033[0m"
tput setf 1
echo "[failed]"
tput sgr0
else
tput cup \$lines \$cols
echo "\\033[1;32m[ done ]\\033[0m"
tput setf 2
echo "[ done ]"
tput sgr0
fi
}
print_yellow () {
echo "\\033[1;33m\$1\\033[0m"
tput setf 3
echo "\$1"
tput sgr0
}
print_yellow "a/ aaQQaa/ a/ _a _a aajQaa _aaQQaa /_aQaaa "