aboutsummaryrefslogtreecommitdiff
path: root/dists
diff options
context:
space:
mode:
authorJohannes Schickel2016-02-18 11:44:10 +0100
committerJohannes Schickel2016-02-18 11:44:53 +0100
commit22b453c4b2621eb9b6edc1b759e6406c923f20c2 (patch)
tree37b6778049d3f38ac4ac3df1e4098cba6600f4ae /dists
parent0d369f716e37f5555ee636d75a3d40e3f3ff0e5f (diff)
downloadscummvm-rg350-22b453c4b2621eb9b6edc1b759e6406c923f20c2.tar.gz
scummvm-rg350-22b453c4b2621eb9b6edc1b759e6406c923f20c2.tar.bz2
scummvm-rg350-22b453c4b2621eb9b6edc1b759e6406c923f20c2.zip
OPENPANDORA: Fix op-pnd target when no TERM is set.
Diffstat (limited to 'dists')
-rwxr-xr-xdists/openpandora/pnd_make.sh13
1 files changed, 10 insertions, 3 deletions
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
}