aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2024-06-25 23:59:19 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2024-06-26 21:15:14 +0100
commit0731985920cdeeeb028f03ddb8a7f035565c1594 (patch)
tree7e0dcdfcf43e03dd96db774c7bfe6d9feaa81ff7
parent6eff23314a7e51715f988acf3c19824fe87b5754 (diff)
downloadgcc-0731985920cdeeeb028f03ddb8a7f035565c1594.zip
gcc-0731985920cdeeeb028f03ddb8a7f035565c1594.tar.gz
gcc-0731985920cdeeeb028f03ddb8a7f035565c1594.tar.bz2
libstdc++: Add script to update docs for a new release branch
This should be run on a release branch after branching from trunk. Various links and references to trunk in the docs will be updated to refer to the new release branch. libstdc++-v3/ChangeLog: * scripts/update_release_branch.sh: New file.
-rwxr-xr-xlibstdc++-v3/scripts/update_release_branch.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/libstdc++-v3/scripts/update_release_branch.sh b/libstdc++-v3/scripts/update_release_branch.sh
new file mode 100755
index 0000000..f8109ed
--- /dev/null
+++ b/libstdc++-v3/scripts/update_release_branch.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+# This should be run on a release branch after branching from trunk.
+# Various links and references to trunk in the docs will be updated to
+# refer to the new release branch.
+
+# The major version of the new release branch.
+major=$1
+(($major)) || { echo "$0: Integer argument expected" >& 2 ; exit 1; }
+
+# This assumes GNU sed
+sed -i "s@^mainline GCC, not in any particular major.\$@the GCC ${major} series.@" doc/xml/manual/status_cxx*.xml
+sed -i 's@https://gcc.gnu.org/cgit/gcc/tree/libstdc++-v3/testsuite/[^"]\+@&?h=releases%2Fgcc-'${major}@ doc/xml/manual/allocator.xml doc/xml/manual/mt_allocator.xml
+sed -i "s@https://gcc.gnu.org/onlinedocs/gcc/Invoking-GCC.html@https://gcc.gnu.org/onlinedocs/gcc-${major}.1.0/gcc/Invoking-GCC.html@" doc/xml/manual/using.xml