diff options
author | ericm <ericm@noemail.net> | 2000-04-26 22:36:10 (GMT) |
---|---|---|
committer | ericm <ericm@noemail.net> | 2000-04-26 22:36:10 (GMT) |
commit | ecc209b09e5037ea6c842057cf714ba0bc77c330 (patch) | |
tree | 024092e4a7dbf7cfd18dc80c7c0cdb45a9ee7ce6 /unix/mkLinks.tcl | |
parent | 67d63a0854fa7b2aacfdeb9be33d76e5d5b39438 (diff) | |
download | tcl-ecc209b09e5037ea6c842057cf714ba0bc77c330.zip tcl-ecc209b09e5037ea6c842057cf714ba0bc77c330.tar.gz tcl-ecc209b09e5037ea6c842057cf714ba0bc77c330.tar.bz2 |
* unix/mkLinks: Regen'd with new mkLinks.tcl.
* unix/mkLinks.tcl: Fixed indentation, made link setup more
intelligent (only do one existance test per man page, instead of
one per function).
* doc/library.n: Fixed .SH NAME macro to include each function
documented on the page, so that mkLinks will know about the
functions listed there, and so that the Windows help file index
will get set up correctly [Bug: 1898, 5273].
FossilOrigin-Name: 04f453e64fd8cecce95c1a19a07c98baa1ef8c57
Diffstat (limited to 'unix/mkLinks.tcl')
-rw-r--r-- | unix/mkLinks.tcl | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/unix/mkLinks.tcl b/unix/mkLinks.tcl index 22f54f3..45a6131 100644 --- a/unix/mkLinks.tcl +++ b/unix/mkLinks.tcl @@ -47,23 +47,31 @@ foreach file $argv { if {[regexp "^.SH NAME" $line]} { set state name } - } - name { - regsub {\\-.*} $line {} line - foreach name [split $line ,] { - regsub -all { } $name "" name - if {![string match $name*$ext $tail]} { + } + name { + regsub {\\-.*} $line {} line + set rmOutput "" + set lnOutput "" + set namelist {} + foreach name [split $line ,] { + regsub -all {(\\)? } $name "" name + if {![string match $name*$ext $tail]} { + lappend namelist $name$ext + append rmOutput " rm -f $name$ext\n" + append lnOutput " ln $tail $name$ext\n" + } + } + if { [llength $namelist] } { puts "if test -r $tail; then" - puts " rm -f $name$ext" - puts " ln $tail $name$ext" + puts -nonewline $rmOutput + puts -nonewline $lnOutput puts "fi" } + set state end + } + end { + break } - set state end - } - end { - break - } } } close $in |