Add route table guide and formatting tweaks
[ric-plt/lib/rmr.git] / doc / src / rtd / fmt_changes.ksh
1 # vim: ts=4 noet sw=4:
2 #==================================================================================
3 #       Copyright (c) 2019 Nokia
4 #       Copyright (c) 2018-2019 AT&T Intellectual Property.
5 #
6 #   Licensed under the Apache License, Version 2.0 (the "License");
7 #   you may not use this file except in compliance with the License.
8 #   You may obtain a copy of the License at
9 #
10 #       http://www.apache.org/licenses/LICENSE-2.0
11 #
12 #   Unless required by applicable law or agreed to in writing, software
13 #   distributed under the License is distributed on an "AS IS" BASIS,
14 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 #   See the License for the specific language governing permissions and
16 #   limitations under the License.
17 #==================================================================================
18
19 #       Mnemonic:       fmt_changes.ksh
20 #       Abstract:       This script looks for CHANGES*.txt files at the top level
21 #                               and builds one {X}fm source file from which the release notes
22 #                               RTD file is created.
23
24 cat <<endKat
25
26 .dv GEN_TITLE 1
27 .dv doc_title RMR Release Notes
28 .im setup.im
29 .dh 1 u=off
30
31 &h1(RMR Release Notes)
32 The following is a list of release highlights for the RMR library.
33 At one point in time the RMR repo also housed a wrapper library with a
34 separate version and release cycle.
35 This resulted in &ital(leap frogging) versions for each package; the
36 RMR core library was assigned odd major numbers (e.g. 3.1.0).
37 When the wrapper code was moved to a different repo the need to leap frog
38 versions ceased, and beginning with version 4.0.0, the RMR versions should
39 no longer skip.
40 &space
41
42 endKat
43
44 for x in ../../../CHANGES*.txt
45 do
46         sed 's/^/!/' $x | awk '
47                 print_raw && /^!$/ {
48                         printf( "&space\n\n" );
49                         next
50                 }
51
52                 { gsub ( "!", "", $1 ) }
53
54                 $1 + 0 >= 2019 {
55                         print_raw = 1
56                         printf( "&h2(%s)\n", $0 )
57                         next
58                 }
59
60                 print_raw { print }
61                 ' ###
62 done