summaryrefslogtreecommitdiffstats
path: root/scripts/LinuxManBook/prepare.pl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-24 04:52:22 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-24 04:52:22 +0000
commit3d08cd331c1adcf0d917392f7e527b3f00511748 (patch)
tree312f0d1e1632f48862f044b8bb87e602dcffb5f9 /scripts/LinuxManBook/prepare.pl
parentAdding debian version 6.7-2. (diff)
downloadmanpages-3d08cd331c1adcf0d917392f7e527b3f00511748.tar.xz
manpages-3d08cd331c1adcf0d917392f7e527b3f00511748.zip
Merging upstream version 6.8.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xshare/mk/build/pdf/book/prepare.pl (renamed from scripts/LinuxManBook/prepare.pl)12
1 files changed, 8 insertions, 4 deletions
diff --git a/scripts/LinuxManBook/prepare.pl b/share/mk/build/pdf/book/prepare.pl
index 735cfcf..a074082 100755
--- a/scripts/LinuxManBook/prepare.pl
+++ b/share/mk/build/pdf/book/prepare.pl
@@ -49,9 +49,10 @@ my $dir2=$dir;
$dir2=~tr[.][_];
my %files;
my %aliases;
-my %target;
-foreach my $al (`grep -E '^\\.so' $dir/man*/*`)
+foreach my $al (`find "$dir"/man*/ -type f \\
+ | grep "\\.[[:digit:]]\\([[:alpha:]][[:alnum:]]*\\)\\?\\>\$" \\
+ | xargs grep '^\\.so' /dev/null;`)
{
#$al=~tr[.][_];
$al=~m/^$dir\/man\d[a-z]*\/(.*):\.\s*so\s*man\d[a-z]*\/(.*)/o;
@@ -66,8 +67,11 @@ while (my ($k,$v)=each %aliases)
}
}
-foreach my $fn (glob "$dir/man*/*")
+foreach my $fn (`find "$dir"/man*/ -type f \\
+ | grep "\\.[[:digit:]]\\([[:alpha:]][[:alnum:]]*\\)\\?\\>\$";`)
{
+ $fn=~s/\n//;
+
my ($nm,$sec)=GetNmSec($fn,qr/\.\d[a-z]*/);
$files{"${nm}.$sec"}=[$fn,(exists($aliases{"${nm}.$sec"}))?$aliases{"${nm}.$sec"}:"${nm}.$sec"];
}
@@ -78,7 +82,7 @@ BuildBook();
sub BuildBook
{
- print ".pdfpagenumbering D . 1\n.nr PDFOUTLINE.FOLDLEVEL 0\n.defcolor pdf:href.colour rgb 0.00 0.25 0.75\n.pdfinfo /Title \"The Linux man-pages Book\"\n.special TINOR S\n";
+ print ".pdfpagenumbering D . 1\n.nr PDFOUTLINE.FOLDLEVEL 0\n.defcolor pdf:href.colour rgb 0.00 0.25 0.75\n.pdfinfo /Title \"The Linux man-pages Book\"\n.special TinosR S\n";
foreach my $bkmark (sort sortman keys %files) {
BuildPage($bkmark);