]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
tests: fix unindent to use printf not echo for script.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 21 Mar 2011 21:12:07 +0000 (22:12 +0100)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 21 Mar 2011 21:12:07 +0000 (22:12 +0100)
* tests/defs.in: Use printf rather than echo, as the latter may
interpret the backslashes in the sed script.  Fixes test
failures with dash as /bin/sh.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
tests/defs.in

index 6f67d36cf98ad7ff10651ce5d7da93b3b8e6a766..18977a94800f8a9d6cb910656813ba12762b5e83 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-03-21  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       tests: fix unindent to use printf not echo for script.
+       * tests/defs.in: Use printf rather than echo, as the latter may
+       interpret the backslashes in the sed script.  Fixes test
+       failures with dash as /bin/sh.
+
 2011-03-01  Peter Rosin  <peda@lysator.liu.se>
 
        test defs: unindent without temporary file
index 2685112ed750c6f9496c2d72358803fc8cc453ea..fb57dfd38261f610f34bd2bef8639da0abf93026 100644 (file)
@@ -464,7 +464,7 @@ commented_sed_unindent_prog='
 unindent ()
 {
   if test x"$sed_unindent_prog" = x; then
-    sed_unindent_prog=`echo "$commented_sed_unindent_prog" | sed -e "s/  *# .*//"`
+    sed_unindent_prog=`printf '%s\n' "$commented_sed_unindent_prog" | sed -e "s/  *# .*//"`
   fi
   sed "$sed_unindent_prog" ${1+"$@"}
 }