diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2010-02-26 10:26:31 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2010-02-26 10:26:31 (GMT) |
commit | 988b0c027264354bc42b3e992ec794f7b88747f8 (patch) | |
tree | 2fd94cf3bbe64c3150110f591a1155d5074003bf /unix | |
parent | d5015423a8ca796a23d778e08e67825d11054a6f (diff) | |
download | tk-988b0c027264354bc42b3e992ec794f7b88747f8.zip tk-988b0c027264354bc42b3e992ec794f7b88747f8.tar.gz tk-988b0c027264354bc42b3e992ec794f7b88747f8.tar.bz2 |
Remap non-alphanumeric sequences in manpage filenames to single underscores.
Diffstat (limited to 'unix')
-rwxr-xr-x | unix/installManPage | 7 |
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` |