[Scummvm-cvs-logs] scummvm branch-1-8 -> 88447f870a39a838515da023afca9175fe553288
lordhoto
lordhoto at gmail.com
Tue Mar 1 10:24:19 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:
af6bf26732 OPENPANDORA: Don't output colors in pnd_make.sh when redirecting output to file.
88447f870a OPENPANDORA: Handle non-exported or not-set $TERM in pnd_make.sh.
Commit: af6bf26732745d358dfcdc61d2b913e15a28d180
https://github.com/scummvm/scummvm/commit/af6bf26732745d358dfcdc61d2b913e15a28d180
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2016-03-01T10:24:06+01:00
Commit Message:
OPENPANDORA: Don't output colors in pnd_make.sh when redirecting output to file.
(cherry picked from commit 01a76df6e3b1ffd95b6a0febfb77bd6003f9441a)
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: 88447f870a39a838515da023afca9175fe553288
https://github.com/scummvm/scummvm/commit/88447f870a39a838515da023afca9175fe553288
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2016-03-01T10:24:06+01:00
Commit Message:
OPENPANDORA: Handle non-exported or not-set $TERM in pnd_make.sh.
(cherry picked from commit 824cb7bc8976a284b63c528c6f3938fe1d5089b9)
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