Skip to content

Commit 0240b28

Browse files
committed
Add script major_release_split to simplify creating release notes for
multiple releases.
1 parent d4b8325 commit 0240b28

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

src/tools/major_release_split

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
:
2+
3+
# This program takes release.sgml and breaks it up into
4+
# per-major-release files that can be copied to the proper
5+
# CVS tree.
6+
7+
[ "$#" -ne 1 ] && echo "Usage: $0 release_sgml_file" 1>&2 && exit 1
8+
9+
FILE="$1"
10+
11+
trap "rm -f /tmp/preamble" 0 1 2 3 15
12+
13+
# Create the SGML preamble file
14+
# Copy from the start of the file to the first "sect1" heading
15+
grep -B 1000000 "`sed -n '/<sect1/p;/<sect1/q' \"$FILE\"`" "$FILE" |
16+
# exclude last line
17+
sed -n '$q;p' > /tmp/preamble
18+
19+
# Create per-major-release files
20+
# spin over all "sect1" releases to find major release numbers
21+
sed -n 's/^ *<sect1 id="release-\([^-]-[^-]\).*/\1/p' "$FILE" |
22+
uniq |
23+
while read RELEASE
24+
do
25+
# copy preamble
26+
cp /tmp/preamble "$RELEASE"-"`basename $FILE`"
27+
# grab remainder of file for major release
28+
grep -A 10000000 "<sect1 id=\"release-$RELEASE" "$FILE" >> "$RELEASE"-"`basename $FILE`"
29+
done
30+

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy