summaryrefslogtreecommitdiff
path: root/docs-xml/scripts/find_missing_manpages
diff options
context:
space:
mode:
Diffstat (limited to 'docs-xml/scripts/find_missing_manpages')
-rwxr-xr-xdocs-xml/scripts/find_missing_manpages39
1 files changed, 39 insertions, 0 deletions
diff --git a/docs-xml/scripts/find_missing_manpages b/docs-xml/scripts/find_missing_manpages
new file mode 100755
index 0000000000..cd8ed87596
--- /dev/null
+++ b/docs-xml/scripts/find_missing_manpages
@@ -0,0 +1,39 @@
+#!/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";
+ }
+}