projects
/
platform
/
upstream
/
gnome-common.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee256d6
)
gnome-autogen.sh: Don't print terminal codes if stdin isn't a tty
3.1.0
author
Colin Walters
<walters@verbum.org>
Wed, 22 Jun 2011 19:53:42 +0000
(15:53 -0400)
committer
Colin Walters
<walters@verbum.org>
Wed, 22 Jun 2011 19:53:42 +0000
(15:53 -0400)
Otherwise this shows up as garbage in log files.
macros2/gnome-autogen.sh
patch
|
blob
|
history
diff --git
a/macros2/gnome-autogen.sh
b/macros2/gnome-autogen.sh
index
ead647a
..
9967f89
100644
(file)
--- a/
macros2/gnome-autogen.sh
+++ b/
macros2/gnome-autogen.sh
@@
-36,8
+36,13
@@
case `echo -n x` in
esac
# some terminal codes ...
-boldface="`tput bold 2>/dev/null`"
-normal="`tput sgr0 2>/dev/null`"
+if tty < /dev/null 1>/dev/null 2>&1; then
+ boldface="`tput bold 2>/dev/null`"
+ normal="`tput sgr0 2>/dev/null`"
+else
+ boldface=
+ normal=
+fi
printbold() {
echo $ECHO_N "$boldface" $ECHO_C
echo "$@"