diff --git a/roffit b/roffit index af2b9eb..0315139 100755 --- a/roffit +++ b/roffit @@ -21,7 +21,7 @@ # # Web: https://daniel.haxx.se/projects/roffit -my $version = "0.17"; +my $version = "0.18"; use strict; #use warnings; @@ -50,6 +50,7 @@ my $mandir; my $hrefdir="."; my $filename; my $leavecase; +my %manhref; while($ARGV[0]) { if($ARGV[0] eq "--bare") { @@ -65,6 +66,14 @@ while($ARGV[0]) { $leavecase = 1; exit; } + elsif($ARGV[0] =~ /^--man=([^=]*)=(.*)/) { + # check for other man pages in the given dir, and if so, link to it + # using the second string. can be specified multiple times + push @mandirs, $1; + $manhref{$1} = $2; + $mandir = 1; # option used + shift @ARGV; + } elsif($ARGV[0] =~ /^--mandir=(.*)/) { # check for other HTMLized man pages in these given dirs # can be specified multiple times @@ -84,6 +93,8 @@ while($ARGV[0]) { " --bare do not put in HTML, HEAD, BODY tags\n", " --hrefdir=