diff options
author | rmax <rmax> | 2006-03-01 19:48:04 (GMT) |
---|---|---|
committer | rmax <rmax> | 2006-03-01 19:48:04 (GMT) |
commit | 6c7e5a2b7ad325e8fdbbc938610a28b6bd713536 (patch) | |
tree | fdbd08db2d51b238ee6c5d30b66e042d22f61b78 /unix/installManPage | |
parent | ee4fdde97a86a54e979eba422b462f0c45ae9121 (diff) | |
download | tcl-6c7e5a2b7ad325e8fdbbc938610a28b6bd713536.zip tcl-6c7e5a2b7ad325e8fdbbc938610a28b6bd713536.tar.gz tcl-6c7e5a2b7ad325e8fdbbc938610a28b6bd713536.tar.bz2 |
* unix/installManPage: Fix the script for manpages that have
quotes around the .SH arguments, as doctools produces them
(Bug#1292145). Some minor cleanups and improvements.
Diffstat (limited to 'unix/installManPage')
-rwxr-xr-x | unix/installManPage | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/unix/installManPage b/unix/installManPage index 93fd925..3bc3bd7 100755 --- a/unix/installManPage +++ b/unix/installManPage @@ -22,34 +22,34 @@ test -z "$S" && S="$DIR/" # A sed script to parse the alternative names out of a man page. # -# /^\\.SH NAME/{ ;# Look for a line, that starts with .SH NAME -# s/^.*$// ;# Delete the content of this line from the buffer -# n ;# Read next line -# s/,//g ;# Remove all commas ... -# s/\\\ //g ;# .. and backslash-escaped spaces. -# s/ \\\-.*// ;# Delete from \- to the end of line -# p ;# print the result -# q ;# exit -# } -# # Backslashes are trippled in the sed script, because it is in -# backticks which don't pass backslashes literally. +# backticks which doesn't pass backslashes literally. # -# Please keep the commented version above updated if you -# change anything to the script below. NAMES=`sed -n ' - /^\\.SH NAME/{ - s/^.*$// + # Look for a line, that starts with .SH NAME + # optionally allow NAME to be surrounded + # by quotes. + /^\.SH "\?NAME"\?/{ + # Read next line n + # Remove all commas ... s/,//g + # ... and backslash-escaped spaces. s/\\\ //g + # Delete from \- to the end of line s/ \\\-.*// - p - q + # print the result and exit + p;q }' $MANPAGE` -SECTION=`echo $MANPAGE | sed 's/.*\(.\)$/\1/'` +case $MANPAGE in + *.1) SECTION=1 ;; + *.3) SECTION=3 ;; + *.n) SECTION=n ;; +esac + SRCDIR=`dirname $MANPAGE` + FIRST="" for f in $NAMES; do f=$f.$SECTION$SUFFIX |