[mm-common] Collapse blank lines in the generated ChangeLog



commit 05bd41a4a0a6995f86043c19d5774342f3496a76
Author: Daniel Elstner <daniel kitta gmail com>
Date:   Mon Aug 31 22:30:37 2009 +0200

    Collapse blank lines in the generated ChangeLog
    
    * build/dist-changelog.am (dist-changelog): Modify the sed program to
    post-process the git output so that it collapses multiple consecutive
    blank lines into a single one.

 build/dist-changelog.am |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/build/dist-changelog.am b/build/dist-changelog.am
index 7c9e905..1cb3849 100644
--- a/build/dist-changelog.am
+++ b/build/dist-changelog.am
@@ -26,7 +26,9 @@ endif
 dist-changelog: $(top_srcdir)/.git/HEAD
 	@if git --git-dir="$(top_srcdir)/.git" --work-tree="$(top_srcdir)" \
 		log --date=short --pretty='format:%cd  %an  <%ae>%n%n%s%n%n%b' \
-	  | sed -e '/^[12]...-[01].-[0123].  [^<>]*  <[^<>]*>$$/ b' \
-		-e 's/^[	 ]*/	/;s/[	 ]*$$//' >.ChangeLog.tmp; \
+	  | sed	-e '/^[12]...-[01].-[0123].  [^<>]*  <[^<>]*>$$/,/^$$/ b' \
+	 	-e '/[^	 ]/,/^[	 ]*$$/! d' \
+		-e 's/^[	 ]*/	/' \
+		-e 's/^[	 ]*$$//' >.ChangeLog.tmp; \
 	then mv -f .ChangeLog.tmp "$(top_distdir)/ChangeLog"; \
 	else rm -f .ChangeLog.tmp; exit 1; fi



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