summaryrefslogtreecommitdiff
path: root/docs/scripts
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-05-15 18:08:19 +0000
committerGerald W. Carter <jerry@samba.org>2008-04-23 08:45:50 -0500
commitf2d4720fcc72c85e41a9a14a4de284915563cb66 (patch)
tree50276087f37ecd73c7be80691e1bc3d39dcabe4f /docs/scripts
parente16f34e94302e06088c5279ae4b0dac875c30cd9 (diff)
downloadsamba-f2d4720fcc72c85e41a9a14a4de284915563cb66.tar.gz
samba-f2d4720fcc72c85e41a9a14a4de284915563cb66.tar.bz2
samba-f2d4720fcc72c85e41a9a14a4de284915563cb66.zip
Add script that detects missing manpages
(This used to be commit 01e70035b9a4cf69bccc5b17c221de01e35c6532)
Diffstat (limited to 'docs/scripts')
-rwxr-xr-xdocs/scripts/find_missing_manpages.pl39
1 files changed, 39 insertions, 0 deletions
diff --git a/docs/scripts/find_missing_manpages.pl b/docs/scripts/find_missing_manpages.pl
new file mode 100755
index 0000000000..b346bf07d3
--- /dev/null
+++ b/docs/scripts/find_missing_manpages.pl
@@ -0,0 +1,39 @@
+#!/usr/bin/perl
+
+my %doc;
+
+$invar = 0;
+
+$topdir = (shift @ARGV) or $topdir = ".";
+
+$progs = "";
+
+open(IN, "$topdir/source/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; }
+}
+
+foreach(split(/bin\//, $progs)) {
+ next if($_ eq " ");
+ s/\@EXEEXT\@//g;
+ s/ //g;
+
+
+ $f = $_;
+
+ $found = 0;
+
+ for($i = 0; $i < 9; $i++) {
+ if(-e "manpages/$f.$i.xml") { $found = 1; }
+ }
+
+ if(!$found) {
+ print "$f doesn't have a manpage!\n";
+ }
+}