OSDN Git Service

sqlite 3.38.3: 翻訳予約解除。
[linuxjm/jm.git] / admin / listchk.perl
1 #!/usr/bin/perl
2 #
3 # translation_list をみて、実際にページがあるかのチェックをする.
4 #
5 BEGIN{
6     $epath = `dirname $0`; chomp $epath;
7     my $lpath = "$epath/../bin";
8     unshift (@INC, $lpath);
9 }
10 use JMtl ('line2hash');
11
12 open TL, "cat `find $epath/../manual -name translation_list | sort` |";
13
14 while(<TL>){
15         chomp;
16         %ti = line2hash($_);
17
18         if ($ti{'kind'} ne 'roff') {
19                 next;
20         }
21
22         if ($ti{'stat'} =~ m/^1st/) {
23                 next;
24         }
25
26         $pkg = $ti{'pkg'};
27         $dir = $pkg; $dir =~ s/ /_/;
28         $name = $ti{'fname'};
29         $sec = $ti{'sec'};
30
31         if ( $ti{'stat'} =~ m/^cnt/ ){
32                 $fpath = "$epath/../manual/$dir/contrib/man$sec/$name.$sec";
33         } else {
34                 $fpath = "$epath/../manual/$dir/release/man$sec/$name.$sec";
35         }
36
37         unless ( -f $fpath ){
38                 print "release of $pkg: $name.$sec does not exist!\n";
39                 print "$fpath\n";
40                 print "$_\n";
41         }
42 }
43