From 824cb7bc8976a284b63c528c6f3938fe1d5089b9 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 29 Feb 2016 19:18:18 +0100 Subject: OPENPANDORA: Handle non-exported or not-set $TERM in pnd_make.sh. --- dists/openpandora/pnd_make.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dists/openpandora/pnd_make.sh b/dists/openpandora/pnd_make.sh index f077c42d0e..a24beaf5d4 100755 --- a/dists/openpandora/pnd_make.sh +++ b/dists/openpandora/pnd_make.sh @@ -44,10 +44,10 @@ cecho () # Color-echo. Argument $1 = message, Argument $2 = color # We only output colors when stdout is outputting to a terminal. # This avoids color codes being output in log files created on buildbot. - if [ -t 1 ]; then + if [ -t 1 -a -n "$TERM" ]; then color=${2:-$black} # Defaults to black, if not specified. echo -e "$color$message" - tput sgr0 # Reset to normal. + tput -T"$TERM" sgr0 # Reset to normal. else echo "$message" fi -- cgit v1.2.3