"link =" from utils.lst was being processed oddly.
Jarkko Hietaniemi [Thu, 15 Nov 2001 04:08:50 +0000 (04:08 +0000)]
p4raw-id: //depot/perl@13015

installman

index 0c146bd..63b781d 100755 (executable)
@@ -1,5 +1,5 @@
 #!./perl -w
-BEGIN { @INC = ('lib') }
+BEGIN { @INC = qw(lib) }
 use strict;
 use Config;
 use Getopt::Long;
@@ -85,8 +85,11 @@ while (<UTILS>) {
     $_ = $1 if /#.*pod\s*=\s*(\S+)/;
     my ($where, $what) = m|^(.*?)/(\S+)|;
     pod2man($where, $opts{man1dir}, $opts{man1ext}, $what);
-    if (($where, $what) = m|#.*link\s*=\s*(\S+)/(\S+)|) {
-        pod2man($where, $opts{man1dir}, $opts{man1ext}, $what);
+    if (my ($where2, $what2) = m|#.*link\s*=\s*(\S+)/(\S+)|) {
+       my $old = "$opts{man1dir}/$what.$opts{man1ext}";
+       my $new = "$opts{man1dir}/$what2.$opts{man1ext}";
+       unlink($new);
+        link($old, $new);
     }
 }