X-Git-Url: https://git.openafs.org/?p=openafs.git;a=blobdiff_plain;f=doc%2Fman-pages%2Fcheck-pod;h=0b79e38cd900b56b5c379afd02280bd6b412c8b0;hp=2e0b24c329a859bb735833d22fa8e944c3a479cf;hb=HEAD;hpb=a8172fca24f91e2b5ab10f66d62d766b7e5d46c1 diff --git a/doc/man-pages/check-pod b/doc/man-pages/check-pod index 2e0b24c..0b79e38 100755 --- a/doc/man-pages/check-pod +++ b/doc/man-pages/check-pod @@ -1,12 +1,35 @@ #!/usr/bin/perl # -# Written by Jason Edgecombe based on the Test::Pod documentation. Run -# it to syntax-check all of the POD files. +# Written by Jason Edgecombe based on the Test::Pod documentation. The +# best way to run it is to run: +# +# prove check-pod +# +# from the doc/man-pages directory, which will show any errors found in +# any of the POD files. +# +# Extended by Davor Ocelic to support explicit list of POD files or +# sections to check: +# +# check-pod pod1/fs.pod +# check-pod pod5 +# check-pod pod1 pod8/volserver.pod +# use strict; use Test::More; eval "use Test::Pod 1.00"; plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; -my @poddirs = qw( pod1 pod5 pod8 ); -all_pod_files_ok( all_pod_files( @poddirs ) ); +my @poddirs = qw( pod1 pod3 pod5 pod8 ); + +my @list; +for ( @ARGV ? @ARGV : @poddirs ) { + if ( -f ) { + push @list, $_ + } elsif ( -d ) { + push @list, grep { !m,fragments/, } all_pod_files( $_ ) + } +} + +all_pod_files_ok( @list );