Actually use real version number in the man page
This commit is contained in:
parent
ad803a5d7a
commit
cb46c84de5
3 changed files with 9 additions and 7 deletions
|
@ -26,7 +26,7 @@ install( FILES scripts/ttrts_complete DESTINATION /etc/bash_completion.d/ )
|
||||||
# Run the gen_usage script to generate our usage header
|
# Run the gen_usage script to generate our usage header
|
||||||
add_custom_target(
|
add_custom_target(
|
||||||
ttrts-gen-manpage ALL
|
ttrts-gen-manpage ALL
|
||||||
${CMAKE_SOURCE_DIR}/scripts/gen_manpage.sh "ttrts.6" "${CMAKE_SOURCE_DIR}/source/client/README.md"
|
${CMAKE_SOURCE_DIR}/scripts/gen_manpage.sh "${TTRTS_VERSION_MAJOR}" "${TTRTS_VERSION_MINOR}" "${TTRTS_VERSION_PATCH}" "ttrts.6" "${CMAKE_SOURCE_DIR}/source/client/README.md"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Install the ttrts man page
|
# Install the ttrts man page
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
# Used to a man page from markdown
|
# Used to a man page from markdown
|
||||||
|
|
||||||
echo ".\" Man page for the ttrts project" > $1
|
|
||||||
echo ".\" this man page is auto-generated, do not edit directly" >> $1
|
|
||||||
|
|
||||||
echo ".TH TTRTS\ v0.3.0 6 $(date +%Y-%m-%d) http://mdiluz.github.io/ttrts/" >> $1
|
|
||||||
|
echo ".\" Man page for the ttrts project" > $4
|
||||||
|
echo ".\" this man page is auto-generated, do not edit directly" >> $4
|
||||||
|
|
||||||
|
echo ".TH TTRTS\ v$1.$2.$3 6 $(date +%Y-%m-%d) http://mdiluz.github.io/ttrts/" >> $4
|
||||||
|
|
||||||
# sections to section headers
|
# sections to section headers
|
||||||
# sub-sections in man page sub-sections
|
# sub-sections in man page sub-sections
|
||||||
|
@ -16,7 +18,7 @@ echo ".TH TTRTS\ v0.3.0 6 $(date +%Y-%m-%d) http://mdiluz.github.io/ttrts/" >> $
|
||||||
# Put all back-ticks quotes in bold
|
# Put all back-ticks quotes in bold
|
||||||
# underline mapfile opt
|
# underline mapfile opt
|
||||||
# ensure name section uses correct
|
# ensure name section uses correct
|
||||||
cat "$2" \
|
cat "$5" \
|
||||||
| sed -r 's/^# (\w+)/.SH \1/g' \
|
| sed -r 's/^# (\w+)/.SH \1/g' \
|
||||||
| sed -r 's/^##+ (\w+)/.SS \1/g' \
|
| sed -r 's/^##+ (\w+)/.SS \1/g' \
|
||||||
| sed -r 's/^ (.*)$/\n\t\1\n/g' \
|
| sed -r 's/^ (.*)$/\n\t\1\n/g' \
|
||||||
|
@ -26,4 +28,4 @@ cat "$2" \
|
||||||
| sed -r 's/-----+//g' \
|
| sed -r 's/-----+//g' \
|
||||||
| sed -r 's/`(.*?)`/\\fB\1\\fR/g' \
|
| sed -r 's/`(.*?)`/\\fB\1\\fR/g' \
|
||||||
| sed -r 's/MAPFILE/\\fImapfile\\fR/g' \
|
| sed -r 's/MAPFILE/\\fImapfile\\fR/g' \
|
||||||
| sed -r 's/\tttrts -/\tttrts \\-/g' >> $1
|
| sed -r 's/\tttrts -/\tttrts \\-/g' >> $4
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
# Used to generate usage text from markdown
|
# Used to generate usage text from markdown
|
||||||
cat README.md \
|
cat README.md \
|
||||||
| sed 's/^#\+ //g' \
|
| sed 's/^#\+ //g' \
|
||||||
| sed 's/^\t/\\t/g' \
|
| sed 's/^\t/\\t/g' \
|
||||||
| sed 's/^ /\\t/g' \
|
| sed 's/^ /\\t/g' \
|
||||||
| sed ':a;N;$!ba;s/\n/\\n\n/g' \
|
| sed ':a;N;$!ba;s/\n/\\n\n/g' \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue