OSDN Git Service

info/GNU_which: Add some explanations.
[linuxjm/jm.git] / admin / chkpkgs.perl
1 #!/usr/bin/perl
2 #
3 # リリースページのあるパッケージ名を出力
4 # bash のプロンプトから
5 #
6 #      % diff -u <(awk '/^[^#]/{print $1}' dist/script/pkgs.list | sort) \
7 #                <(admin/chkpkgs.perl|sort)
8 #
9 # とかするといいです。めんどくさいけど。
10 #
11 BEGIN{
12     $epath = `dirname $0`; chomp $epath;
13     my $lpath = "$epath/../bin";
14     unshift (@INC, $lpath);
15 }
16 use JMtl ('line2hash');
17
18 open TLL, "find $epath/../manual -name translation_list |";
19
20 while(<TLL>){
21         chomp;
22         $tlf = $_;
23         if (/\/([^\/]*)\/translation_list/){
24                 $pkg = $1;
25         }
26
27         open TL, $tlf;
28         while (<TL>){
29                 chomp;
30                 %ti = line2hash($_);
31
32                 if ($ti{'stat'} !~ m/^1st/) {
33                         print "$pkg\n";
34                         last;
35                 }
36         }
37 }
38