From: Hallvard Furuseth Date: Fri, 18 May 2007 18:42:59 +0000 (+0000) Subject: Only use terminal escapes (in $TB/$TN) when printing to a terminal. X-Git-Tag: OPENLDAP_REL_ENG_2_4_MP~458 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2d5316b4c19b74ba558c7b5d0c851488a5c1f51f;p=openldap Only use terminal escapes (in $TB/$TN) when printing to a terminal. --- 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 "#######################################################################"