changeset 49344:d1f15789b40b

Better sed script.
author Francesco Potortì <pot@gnu.org>
date Mon, 20 Jan 2003 16:15:15 +0000
parents 0c32620c3c06
children 79a402242606
files admin/make-announcement
diffstat 1 files changed, 13 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/admin/make-announcement	Mon Jan 20 14:27:43 2003 +0000
+++ b/admin/make-announcement	Mon Jan 20 16:15:15 2003 +0000
@@ -62,7 +62,18 @@
 EOF
 
 cvs -q diff -b -r $oldtag -r $newtag $(find -name ChangeLog|sort) |
-    sed -n -e 's/^=\+//p' -e 's/^> //p' -e 's/^diff.*//p' \
-	-e 's/^RCS file: .cvsroot.emacs.emacs.\(.*\),v/\1/p'
+    sed -n -e 's/^=\+/======/p' -e 's/^> //p' -e 's/^diff.*//p' \
+	-e 's/^RCS file: .cvsroot.emacs.emacs.\(.*\),v/\1/p' |
+    sed -n -e "/^======$/ {
+                N
+                N
+                h
+                d
+               }
+               H
+               s/.*//
+               x
+               s/^\n//
+	       p"
 
 echo " announcement created in $outfile" >&2