mirror of https://github.com/openssl/openssl.git
				
				
				
			Handle the renamed command POD files in find-doc-nits
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9729)
This commit is contained in:
		
							parent
							
								
									2ad75c6c13
								
							
						
					
					
						commit
						bc5a80910d
					
				|  | @ -533,6 +533,7 @@ my %skips = ( | ||||||
| 
 | 
 | ||||||
| sub checkflags() { | sub checkflags() { | ||||||
|     my $cmd = shift; |     my $cmd = shift; | ||||||
|  |     my $doc = shift; | ||||||
|     my %cmdopts; |     my %cmdopts; | ||||||
|     my %docopts; |     my %docopts; | ||||||
|     my $ok = 1; |     my $ok = 1; | ||||||
|  | @ -548,8 +549,8 @@ sub checkflags() { | ||||||
|     close CFH; |     close CFH; | ||||||
| 
 | 
 | ||||||
|     # Get the list of flags from the synopsis |     # Get the list of flags from the synopsis | ||||||
|     open CFH, "<doc/man1/$cmd.pod" |     open CFH, "<$doc" | ||||||
|         || die "Can't open $cmd.pod, $!"; |         || die "Can't open $doc, $!"; | ||||||
|     while ( <CFH> ) { |     while ( <CFH> ) { | ||||||
|         chop; |         chop; | ||||||
|         last if /DESCRIPTION/; |         last if /DESCRIPTION/; | ||||||
|  | @ -617,13 +618,15 @@ if ( $opt_c ) { | ||||||
|     close FH; |     close FH; | ||||||
| 
 | 
 | ||||||
|     # See if each has a manpage. |     # See if each has a manpage. | ||||||
|     foreach ( @commands ) { |     foreach my $cmd ( @commands ) { | ||||||
|         next if $_ eq 'help' || $_ eq 'exit'; |         next if $cmd eq 'help' || $cmd eq 'exit'; | ||||||
|         if ( ! -f "doc/man1/$_.pod" ) { |         my $doc = "doc/man1/$cmd.pod"; | ||||||
|             print "doc/man1/$_.pod does not exist\n"; |         $doc = "doc/man1/openssl-$cmd.pod" if -f "doc/man1/openssl-$cmd.pod"; | ||||||
|  |         if ( ! -f "$doc" ) { | ||||||
|  |             print "$doc does not exist\n"; | ||||||
|             $ok = 0; |             $ok = 0; | ||||||
|         } else { |         } else { | ||||||
|             $ok = 0 if not &checkflags($_); |             $ok = 0 if not &checkflags($cmd, $doc); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue