automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.11-313-g


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.11-313-ga118732
Date: Wed, 16 Feb 2011 12:21:34 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=a118732d1138b169e3c41759b8e3e03945994172

The branch, maint has been updated
       via  a118732d1138b169e3c41759b8e3e03945994172 (commit)
      from  5bf7af6e1e5fa63bc192ed972ef8c83dd6faec2b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 ChangeLog     |    6 ++++++
 tests/defs.in |   18 ++++++++++++++++++
 2 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index fa53707..4563585 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-02-16  Stefano Lattarini  <address@hidden>
+           Ralf Wildenhues  <address@hidden>
+
+       test defs: add subroutine for input unindenting
+       * tests/defs.in (unindent): New subroutine.
+
 2011-02-15  Stefano Lattarini  <address@hidden>
 
        python: report the 'PYTHON' influential environment variable
diff --git a/tests/defs.in b/tests/defs.in
index eb92caa..ffe21e1 100644
--- a/tests/defs.in
+++ b/tests/defs.in
@@ -440,6 +440,24 @@ AUTOMAKE_fails ()
   AUTOMAKE_run 1 ${1+"$@"}
 }
 
+# unindent [input files...]
+# -------------------------
+# Remove the "proper" amount of leading whitespace from the given files,
+# and output the result on stdout.  That amount is determined by looking
+# at the leading whitespace of the first non-blank line in the input
+# files.  If no input file is specified, standard input is implied.
+unindent ()
+{
+  cat ${1+"$@"} > deindent.tmp
+  indentation=`sed <deindent.tmp -n "
+    /[^ $tab].*$/{
+      s///p
+      q
+  }"`
+  sed "s/^$indentation//" deindent.tmp
+  rm -f deindent.tmp
+}
+
 # Turn on shell traces.
 set -x
 


hooks/post-receive
-- 
GNU Automake



reply via email to

[Prev in Thread] Current Thread [Next in Thread]