diff options
Diffstat (limited to 'scripts/doc-check')
-rwxr-xr-x | scripts/doc-check | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/scripts/doc-check b/scripts/doc-check index aac4e0470..b8d0816ea 100755 --- a/scripts/doc-check +++ b/scripts/doc-check @@ -62,24 +62,31 @@ sub getrev { my ($plfname, $enfname) = (@_); my ($plrev, $enrev, $untrans, $notconverted) = (0, 0, 0, 0); + my $line = 0; warn "checking $plfname:\n" if $opt_v; open FILE, $plfname or warn "$plfname: $!\n" and return; while (<FILE>) { - if (/<!--\s*original version\D*([\d\.]+)\s*-->/) { + $line++; + + # Also check for revision comments of original documents + # These may be used in combination with a translation comment in + # which case the translation comment overrules what's found here + if (($plrev == 0) && (/<!--\s*\$Id: \S+ (\d+) /)) { $plrev = $1; - last; + $notconverted = 1; + $untrans = 1; } - if (/<!--\s*original version\D*(\d+)\s*untranslated\s*-->/) { + if (/<!--\s*original version\D*([\d\.]+)\s*-->/) { $plrev = $1; - $untrans = 1; + $untrans = 0; + $notconverted = 0; last; } - # Also check for revision comments of original documents - if (/<!--\s*\$Id: \S+ (\d+) /) { + if (/<!--\s*original version\D*(\d+)\s*untranslated\s*-->/) { $plrev = $1; - $notconverted = 1; $untrans = 1; + $notconverted = 0; last; } # Also support CVS style revision comments (depreciated) @@ -87,6 +94,9 @@ sub getrev $plrev = $1; last; } + if ($line++ > 10) { + last; + } } warn "checking $enfname:\n" if $opt_v; open FILE, $enfname or warn "$enfname: $!\n" and return; |