diff options
author | Christian Persch <chpe@gnome.org> | 2007-06-08 21:08:27 +0000 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2007-06-08 21:08:27 +0000 |
commit | a9b22049c8e6e9c4059ecc9d02123ec1dfc52c7c (patch) | |
tree | 190a4a6f87c98834fd18d61da3263ed98b05788a | |
parent | d6e1e2887f608774ad7e4149bd1d64dde30c3241 (diff) | |
download | shared-mime-info-a9b22049c8e6e9c4059ecc9d02123ec1dfc52c7c.tar.gz |
Don't print extra newlines when /bin/sh isn't bash. Bug #130346.
2007-06-08 Christian Persch <chpe@gnome.org>
* macros2/gnome-autogen.sh: Don't print extra newlines when /bin/sh
isn't bash. Bug #130346.
svn path=/trunk/; revision=3908
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | macros2/gnome-autogen.sh | 20 |
2 files changed, 18 insertions, 7 deletions
@@ -1,5 +1,10 @@ 2007-06-08 Christian Persch <chpe@gnome.org> + * macros2/gnome-autogen.sh: Don't print extra newlines when /bin/sh + isn't bash. Bug #130346. + +2007-06-08 Christian Persch <chpe@gnome.org> + * macros2/gnome-autogen.sh: Don't print warning about missing arguments if we're not going to run configure. Bug #445584, patch by "Cygwin Ports maintainer" (yselkowitz%40users.sourceforge.net). diff --git a/macros2/gnome-autogen.sh b/macros2/gnome-autogen.sh index f57a876e..b99ee219 100644 --- a/macros2/gnome-autogen.sh +++ b/macros2/gnome-autogen.sh @@ -23,19 +23,25 @@ FORBIDDEN_M4MACROS=${FORBIDDEN_M4MACROS:-} # Not all echo versions allow -n, so we check what is possible. This test is # based on the one in autoconf. -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ;; - *c*,* ) ECHO_N=-n ;; - *) ECHO_N= ;; +ECHO_C= +ECHO_N= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ;; + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac # some terminal codes ... boldface="`tput bold 2>/dev/null`" normal="`tput sgr0 2>/dev/null`" printbold() { - echo $ECHO_N "$boldface" + echo $ECHO_N "$boldface" $ECHO_C echo "$@" - echo $ECHO_N "$normal" + echo $ECHO_N "$normal" $ECHO_C } printerr() { echo "$@" >&2 @@ -85,7 +91,7 @@ version_check() { fi printbold "checking for $vc_package $vc_comparator $vc_min_version..." for vc_checkprog in $vc_checkprogs; do - echo $ECHO_N " testing $vc_checkprog... " + echo $ECHO_N " testing $vc_checkprog... " $ECHO_C if $vc_checkprog --version < /dev/null > /dev/null 2>&1; then vc_actual_version=`$vc_checkprog --version | head -n 1 | \ sed 's/^.*[ ]\([0-9.]*[a-z]*\).*$/\1/'` |