1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00
samba-mirror/docs-xml/scripts/find_missing_manpages.pl
Karolin Seeger 75484f4911 docs: Rename manpages-3 -> manpages.
This change was suggested by Andrew Bartlett on the samba-technical mailing
list.

Karolin

Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Mon Sep  3 23:35:38 CEST 2012 on sn-devel-104
2012-09-03 23:35:37 +02:00

40 lines
634 B
Perl
Executable File

#!/usr/bin/perl
my %doc;
$invar = 0;
$topdir = (shift @ARGV) or $topdir = ".";
$progs = "";
open(IN, "$topdir/Makefile.in");
while(<IN>) {
if($invar && /^([ \t]*)(.*?)([\\])$/) {
$progs.=" " . $2;
if($4) { $invar = 1; } else { $invar = 0; }
} elsif(/^([^ ]*)_PROGS([0-9]*) = (.*?)([\\])$/) {
$progs.=" " . $3;
if($4) { $invar = 1; }
} else { $invar = 0; }
}
$progs =~ s/@([^@]+)@//g;
foreach(split(/bin\//, $progs)) {
next if($_ eq " ");
s/ //g;
$f = $_;
$found = 0;
for($i = 0; $i < 9; $i++) {
if(-e "manpages/$f.$i.xml") { $found = 1; }
}
if(!$found) {
print "'$f' does not have a manpage\n";
}
}