Correct man page formatting in RST output
[ric-plt/lib/rmr.git] / doc / src / rtd / fmt_changes.ksh
index 095bea0..930bce4 100644 (file)
 
 cat <<endKat
 
+.** ------------------------------------------------------------------------
+.** CAUTION: This .xfm file is automatically generated by fmt_changes.ksh
+.**          do NOT edit. Use 'make rel-notes.xfm' to regenerate.
+.** ------------------------------------------------------------------------
+
 .dv GEN_TITLE 1
 .dv doc_title RMR Release Notes
 .im setup.im
@@ -37,26 +42,29 @@ RMR core library was assigned odd major numbers (e.g. 3.1.0).
 When the wrapper code was moved to a different repo the need to leap frog
 versions ceased, and beginning with version 4.0.0, the RMR versions should
 no longer skip.
-&space
 
 endKat
 
 for x in ../../../CHANGES*.txt
 do
-       sed 's/^/!/' $x | awk '
-               print_raw && /^!$/ {
+       awk '
+               /^#/ { next }           # ditch all comments
+
+               # tag project releases by matching release tag associated
+               /4\.0\.5$/  { printf( "&h1(Bronze Release)\n" ); rheader = 1 }
+               /1\.11\.1$/ { printf( "&h1(Amber Release)\n" ); rheader = 1 }
+
+               print_raw && /^$/ {                             # include blank lines after first real stuff
                        printf( "&space\n\n" );
                        next
                }
 
-               { gsub ( "!", "", $1 ) }
-
                $1 + 0 >= 2019 {
-                       print_raw = 1
+                       print_raw = 1                           # safe to print blank lines
                        printf( "&h2(%s)\n", $0 )
                        next
                }
 
                print_raw { print }
-               ' ###
+       ' $x
 done