diff options
-rw-r--r-- | macros2/gnome-autogen.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/macros2/gnome-autogen.sh b/macros2/gnome-autogen.sh index ead647a6..9967f896 100644 --- 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 "$@" |