Skip to content

Commit

Permalink
OPENPANDORA: Fix op-pnd target when no TERM is set.
Browse files Browse the repository at this point in the history
(cherry picked from commit 22b453c)
  • Loading branch information
Johannes Schickel committed Feb 18, 2016
1 parent fcdd7e6 commit 8e90a33
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions dists/openpandora/pnd_make.sh
Expand Up @@ -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
}

Expand Down

0 comments on commit 8e90a33

Please sign in to comment.