summaryrefslogtreecommitdiffstats
path: root/rtems-release
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2020-04-02 17:41:46 +1100
committerChris Johns <chrisj@rtems.org>2020-04-02 17:41:46 +1100
commitdb971a69cc5d18dc5692ea672f6d3e1633e7fe49 (patch)
tree1c0be92028089bea2a52c3e3ba3f7816061cff33 /rtems-release
parentcron: Remove the debug exit code clearing. (diff)
downloadrtems-release-db971a69cc5d18dc5692ea672f6d3e1633e7fe49.tar.bz2
Move all source into `sources`
- Update the README.txt to reference all the sources in the `sources` directory. Also fix the table formatting. - Add support for a release url to aid test and support deployment. - Make the docs and sources directory defaults
Diffstat (limited to 'rtems-release')
-rwxr-xr-xrtems-release24
1 files changed, 19 insertions, 5 deletions
diff --git a/rtems-release b/rtems-release
index 7d3c671..f4bbfe3 100755
--- a/rtems-release
+++ b/rtems-release
@@ -1,7 +1,7 @@
#! /bin/sh
#
# RTEMS Tools Project (http://www.rtems.org/)
-# Copyright 2015,2016,2019 Chris Johns (chrisj@rtems.org)
+# Copyright 2015,2016,2019,2020 Chris Johns (chrisj@rtems.org)
# All rights reserved.
#
# This file is part of the RTEMS Tools package in 'rtems-tools'.
@@ -80,7 +80,6 @@ while getopts ":u:" opt; do
done
shift $((OPTIND-1))
-
if [ $# -ne 2 ]; then
echo "error: 2 arguments must be supplied, version and revision. See -h for help"
exit 1
@@ -145,13 +144,28 @@ echo "Collect tools sources"
./rtems-release-sources ${version} ${revision} ${release_url}
#
-# Create the README.txt
+# Create the README.txt.
+#
+# The initial stage is done in a few steps where the release files table is cut
+# out of the input template file and formatted using the column command and
+# inserted back.
#
+escaped_release_url=$(echo ${release_url} | sed -e 's/\//\\\//g')
cat ${rtems_readme} | \
- sed -e "s/@RELEASE@/${release}/g" \
+ sed -e "s/@RELEASE_URL@/${escaped_release_url}/g" \
+ -e "s/@RELEASE@/${release}/g" \
-e "s/@VERSION@/${version}/g" \
-e "s/@REVISION@/${revision}/g" \
- -e "s/@DATE@/${now}/g" > ${release}/README.txt
+ -e "s/@DATE@/${now}/g" > ${release}/README.1.txt
+cat ${release}/README.1.txt | \
+ sed -n '/^@TABLE-START@/,/^@TABLE-END@/p' | \
+ sed -e 's/@TABLE-START@//g' -e 's/@TABLE-END@//g' | \
+ column -s '|' -t | \
+ sed -e 's/$/\\/' > ${release}/README.2.txt
+cat ${release}/README.1.txt | \
+ sed -e "/@TABLE-START@/,/@TABLE-END@/c\\
+$(cat ${release}/README.2.txt)" > ${release}/README.txt
+rm -f ${release}/README.1.txt ${release}/README.2.txt
if [ -n "${rtems_readme_release_notes}" ]; then
echo >> ${release}/README.txt
echo "Release Notes" >> ${release}/README.txt