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 | |
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.
-rw-r--r-- | ChangeLog | 6 | ||||
-rwxr-xr-x | unix/installManPage | 36 |
2 files changed, 24 insertions, 18 deletions
@@ -1,3 +1,9 @@ +2006-03-01 Reinhard Max <max@suse.de> + + * 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. + 2006-02-28 Don Porter <dgp@users.sourceforge.net> * generic/tclBasic.c: Corrections to be sure that TCL_EVAL_GLOBAL 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 |