No need to edit again a file already edited. In addition, if editing the file, a zero-length file is generated.
* build-aux-edit-readme-alpha: Skip a file already edited. --- build-aux/edit-readme-alpha | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/build-aux/edit-readme-alpha b/build-aux/edit-readme-alpha index 4b4d395..4f7c214 100755 --- a/build-aux/edit-readme-alpha +++ b/build-aux/edit-readme-alpha @@ -68,12 +68,15 @@ for file in "$@"; do |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/,/a consistent, portable interface\.$/p' $file \ - |wc -l |sed 's|^ *||'` - - test 3 = "$matched" \ - || func_fatal_error "$file format has changed, please fix '$0'" + test 3 = "$matched" || { + matched=`sed -n -e '/^This is an alpha testing release/,/a consistent, portable interface\.$/p' $file \ + |wc -l |sed 's|^ *||'` + + # if already edited, no need to edit again. + test 3 = "$matched" \ + && continue \ + || func_fatal_error "$file format has changed, please fix '$0'" + } # Don't leave file droppings. trap 'x=$?; rm $file.T; exit $x' 1 2 13 15 -- 1.8.5.2