]> git.sur5r.net Git - openldap/commitdiff
Only use terminal escapes (in $TB/$TN) when printing to a terminal.
authorHallvard Furuseth <hallvard@openldap.org>
Fri, 18 May 2007 18:42:59 +0000 (18:42 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Fri, 18 May 2007 18:42:59 +0000 (18:42 +0000)
configure.in
tests/scripts/all
tests/scripts/sql-all

index 0a7ce510f2dee2f24dae004f09fc00098f1880d3..9edcb3e0687e74c46ad9b91830814477fe87d665 100644 (file)
@@ -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
index b9b90821f4a697af04883e0de2b890878dfbde93..3e8c80886f41cc0dd16b531fdd71389086144e80 100755 (executable)
 ## <http://www.OpenLDAP.org/license.html>.
 
 . $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"
index 67ff71339413a174b664af6d5494d0e6d91b70b2..5c8fef7408a43b9276fa8e4271fb312e8b085d34 100755 (executable)
 ## <http://www.OpenLDAP.org/license.html>.
 
 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 "#######################################################################"