From 2d5316b4c19b74ba558c7b5d0c851488a5c1f51f Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Fri, 18 May 2007 18:42:59 +0000 Subject: [PATCH] Only use terminal escapes (in $TB/$TN) when printing to a terminal. --- configure.in | 7 +++++-- tests/scripts/all | 9 +++++++-- tests/scripts/sql-all | 9 +++++++-- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/configure.in b/configure.in index 0a7ce510f2..9edcb3e068 100644 --- a/configure.in +++ b/configure.in @@ -50,8 +50,11 @@ fi SHTOOL="$ac_cv_shtool" dnl AC_SUBST(SHTOOL)dnl -TB="`$SHTOOL echo -e '%B' 2>/dev/null`" -TN="`$SHTOOL echo -e '%b' 2>/dev/null`" +TB="" TN="" +if test -t 1; then + TB="`$SHTOOL echo -e '%B' 2>/dev/null`" + TN="`$SHTOOL echo -e '%b' 2>/dev/null`" +fi OPENLDAP_CVS="" if test -d $ac_aux_dir/CVS; then diff --git a/tests/scripts/all b/tests/scripts/all index b9b90821f4..3e8c80886f 100755 --- a/tests/scripts/all +++ b/tests/scripts/all @@ -14,8 +14,13 @@ ## . . $SRCDIR/scripts/defines.sh -TB=`$SHTOOL echo -e "%B"` -TN=`$SHTOOL echo -e "%b"` + +TB="" TN="" +if test -t 1 ; then + TB=`$SHTOOL echo -e "%B" 2>/dev/null` + TN=`$SHTOOL echo -e "%b" 2>/dev/null` +fi + SLEEPTIME=10 echo ">>>>> Executing all LDAP tests for $BACKEND" diff --git a/tests/scripts/sql-all b/tests/scripts/sql-all index 67ff713394..5c8fef7408 100755 --- a/tests/scripts/sql-all +++ b/tests/scripts/sql-all @@ -14,8 +14,13 @@ ## . SHTOOL="$SRCDIR/../build/shtool" -TB=`$SHTOOL echo -e "%B"` -TN=`$SHTOOL echo -e "%b"` + +TB="" TN="" +if test -t 1 ; then + TB=`$SHTOOL echo -e "%B" 2>/dev/null` + TN=`$SHTOOL echo -e "%b" 2>/dev/null` +fi + SLEEPTIME=10 echo "#######################################################################" -- 2.39.5