From 6c7e5a2b7ad325e8fdbbc938610a28b6bd713536 Mon Sep 17 00:00:00 2001 From: rmax Date: Wed, 1 Mar 2006 19:48:04 +0000 Subject: * 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. --- ChangeLog | 6 ++++++ unix/installManPage | 36 ++++++++++++++++++------------------ 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 912cc06..d4bff04 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-03-01 Reinhard Max + + * 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 * 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 -- cgit v0.12