+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
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'"