summaryrefslogtreecommitdiffstats
path: root/unix/installManPage
diff options
context:
space:
mode:
Diffstat (limited to 'unix/installManPage')
-rwxr-xr-xunix/installManPage47
1 files changed, 31 insertions, 16 deletions
diff --git a/unix/installManPage b/unix/installManPage
index 1e29bb0..3cb266d 100755
--- a/unix/installManPage
+++ b/unix/installManPage
@@ -12,8 +12,8 @@ Suffix=""
while true; do
case $1 in
- -s | --symlinks ) Sym="-s " ;;
- -z | --compress ) Gzip=$2; shift ;;
+ -s | --symlinks ) Sym="-s " ;;
+ -z | --compress ) Gzip=$2; shift ;;
-e | --extension ) Gz=$2; shift ;;
-x | --suffix ) Suffix=$2; shift ;;
-*) cat <<EOF
@@ -61,20 +61,35 @@ test -z "$Sym" && Loc="$Dir/"
#
Names=`sed -n '
# Look for a line that starts with .SH NAME
- /^\.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/ \\\-.*//
-# Convert all non-space non-alphanum sequences
-# to single underscores.
- s/[^ A-Za-z0-9][^ A-Za-z0-9]*/_/g
-# print the result and exit
- p;q
+ /^\.SH NAME/,/^\./{
+
+
+ /^\./!{
+
+ # Remove all commas...
+ s/,//g
+
+ # ... and backslash-escaped spaces.
+ s/\\\ //g
+
+ /\\\-.*/{
+ # Delete from \- to the end of line
+ s/ \\\-.*//
+ h
+ s/.*/./
+ x
+ }
+
+ # Convert all non-space non-alphanum sequences
+ # to single underscores.
+ s/[^ A-Za-z0-9][^ A-Za-z0-9]*/_/g
+ p
+ g
+ /^\./{
+ q
+ }
+ }
+
}' $ManPage`
if test -z "$Names" ; then