From 22b453c4b2621eb9b6edc1b759e6406c923f20c2 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 18 Feb 2016 11:44:10 +0100 Subject: OPENPANDORA: Fix op-pnd target when no TERM is set. --- dists/openpandora/pnd_make.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'dists') diff --git a/dists/openpandora/pnd_make.sh b/dists/openpandora/pnd_make.sh index 0c03e8154d..202f137acc 100755 --- a/dists/openpandora/pnd_make.sh +++ b/dists/openpandora/pnd_make.sh @@ -41,9 +41,16 @@ cecho () # Color-echo. Argument $1 = message, Argument $2 = color { local default_msg="No message passed." # Doesn't really need to be a local variable. message=${1:-$default_msg} # Defaults to default message. - color=${2:-$black} # Defaults to black, if not specified. - echo -e "$color$message" - tput sgr0 # Reset to normal. + + # We only output colors when a TERM environment variable is set. This + # fixes execution of the script on buildbot, which does not have this set. + if [ -z "$TERM" ]; then + echo "$message" + else + color=${2:-$black} # Defaults to black, if not specified. + echo -e "$color$message" + tput sgr0 # Reset to normal. + fi return } -- cgit v1.2.3