diff options
-rw-r--r-- | macros/mate-autogen | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/macros/mate-autogen b/macros/mate-autogen index 6907f6e..de3ddb6 100644 --- a/macros/mate-autogen +++ b/macros/mate-autogen @@ -51,8 +51,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 "$@" |