]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
maint: edit-readme-alpha shouldn't try to re-edit during dist.
authorGary V. Vaughan <gary@gnu.org>
Tue, 21 Sep 2010 00:57:15 +0000 (07:57 +0700)
committerGary V. Vaughan <gary@gnu.org>
Tue, 21 Sep 2010 07:10:38 +0000 (14:10 +0700)
* libltdl/config/edit-readme-alpha: If README is non-writable
assume that it is being run from distcheck, and bail out with
a warning (to help diagnose cases where the heuristic is not
correct).  However, if README has already been edited to the
alpha text, quietly skip without an error message.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
ChangeLog
libltdl/config/edit-readme-alpha

index ceb193cd48750a092a09ab6bfe5f93ab3e18b767..4934ce585d81a5325881a9ca3597b4906974575f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2010-09-21  Gary V. Vaughan  <gary@gnu.org>
+
+       maint: edit-readme-alpha shouldn't try to re-edit during dist.
+       * libltdl/config/edit-readme-alpha: If README is non-writable
+       assume that it is being run from distcheck, and skip the edit
+       with a warning (to help diagnose cases where the heuristic is
+       not correct).  However, if README has already been edited to
+       the alpha text, quietly skip without an error message.
+
 2010-09-20  Eric Blake  <eblake@redhat.com>
 
        maint: drop autobuild requirement
index 6070a31975705f08adebcb0cf017b9828e21ebac..ee6ca6b97deb915ac11945f67cfc81d2b0750d9d 100755 (executable)
@@ -55,10 +55,23 @@ func_fatal_error ()
 
 
 for file in "$@"; do
+  # Assume that read-only README indicates that we are running inside
+  # the latter part of a `make distcheck'.
+  test -w $file || {
+    echo "$progname: not editing non-writeable \`$file' (distcheck?)" >&2
+    continue
+  }
+
   # Make sure the paragraph we are matching has not been edited since
   # this script was written.
-  matched=`sed -n -e '/^This is GNU Libtool,/,/^interface.$/p' $file \
-      |wc -l |sed 's|^ *||'`
+  matched=`sed -n -e '/^This is GNU Libtool,/,/^interface\.$/p' $file \
+           |wc -l |sed 's|^ *||'`
+
+  # Unless, of course, it was edited by this script already.
+  test 3 = "$matched" \
+      || matched=`sed -n -e '/^This is an alpha testing release/,/behind a consistent, portable interface\.$/p' $file \
+                  |wc -l |sed 's|^ *||'`
+
   test 3 = "$matched" \
       || func_fatal_error "$file format has changed, please fix \`$0'"