[Scummvm-cvs-logs] scummvm master -> 824cb7bc8976a284b63c528c6f3938fe1d5089b9

lordhoto lordhoto at gmail.com
Mon Feb 29 19:19:42 CET 2016


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
01a76df6e3 OPENPANDORA: Don't output colors in pnd_make.sh when redirecting output to file.
824cb7bc89 OPENPANDORA: Handle non-exported or not-set $TERM in pnd_make.sh.


Commit: 01a76df6e3b1ffd95b6a0febfb77bd6003f9441a
    https://github.com/scummvm/scummvm/commit/01a76df6e3b1ffd95b6a0febfb77bd6003f9441a
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2016-02-29T19:10:10+01:00

Commit Message:
OPENPANDORA: Don't output colors in pnd_make.sh when redirecting output to file.

Changed paths:
    dists/openpandora/pnd_make.sh



diff --git a/dists/openpandora/pnd_make.sh b/dists/openpandora/pnd_make.sh
index 202f137..f077c42 100755
--- a/dists/openpandora/pnd_make.sh
+++ b/dists/openpandora/pnd_make.sh
@@ -42,14 +42,14 @@ 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.
 
-	# 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
+	# 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
 		color=${2:-$black}                       # Defaults to black, if not specified.
 		echo -e "$color$message"
 		tput sgr0                                # Reset to normal.
+	else
+		echo "$message"
 	fi
 	return
 } 


Commit: 824cb7bc8976a284b63c528c6f3938fe1d5089b9
    https://github.com/scummvm/scummvm/commit/824cb7bc8976a284b63c528c6f3938fe1d5089b9
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2016-02-29T19:19:09+01:00

Commit Message:
OPENPANDORA: Handle non-exported or not-set $TERM in pnd_make.sh.

Changed paths:
    dists/openpandora/pnd_make.sh



diff --git a/dists/openpandora/pnd_make.sh b/dists/openpandora/pnd_make.sh
index f077c42..a24beaf 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






More information about the Scummvm-git-logs mailing list