summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2010-02-26 10:25:35 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2010-02-26 10:25:35 (GMT)
commit3434566a605bb11e0f5a78d6f3996ede7f728e68 (patch)
tree57f0a1bb365b2be820fd92fe51a03a105ebb2275 /unix
parent85c76436fded17c553a0f921bf68497af3adef0f (diff)
downloadtcl-3434566a605bb11e0f5a78d6f3996ede7f728e68.zip
tcl-3434566a605bb11e0f5a78d6f3996ede7f728e68.tar.gz
tcl-3434566a605bb11e0f5a78d6f3996ede7f728e68.tar.bz2
Remap non-alphanumeric sequences in manpage filenames to single underscores.
Diffstat (limited to 'unix')
-rwxr-xr-xunix/installManPage7
1 files changed, 4 insertions, 3 deletions
diff --git a/unix/installManPage b/unix/installManPage
index 6bdccf0..4d615bf 100755
--- a/unix/installManPage
+++ b/unix/installManPage
@@ -59,9 +59,7 @@ test -z "$SymOrLoc" && SymOrLoc="$Dir/"
# backticks which doesn't pass backslashes literally.
#
Names=`sed -n '
-# Look for a line, that starts with .SH NAME
-# optionally allow NAME to be surrounded
-# by quotes.
+# Look for a line that starts with .SH NAME
/^\.SH NAME/{
# Read next line
n
@@ -71,6 +69,9 @@ Names=`sed -n '
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
}' $ManPage`