21 my @opt = <<'=back' =~ /B<--(\S+)>/g;
31 Read from stdin a list of distros to eliminate. Rewrite annotate.txt
34 Clobbers annotate.txt without asking.
36 Was in use the first time 2013-11-02 and eliminated 784 annotation.
39 2014-02-20 03:38 ssh andreas@analysis cat filter-outdated-from-analysis-logfile.out | perl bin/eliminate-outdated-annotations.pl
41 The file filter-outdated-from-analysis-logfile.out was generated on analysis:
43 2014-02-20 02:36 ~/src/installed-perls/v5.16.0/4e6d/bin/perl bin/filter-outdated-from-analysis-logfile.pl bin/cnntp-solver.sh.out | tee ~/filter-outdated-from-analysis-logfile.out
49 use lib
"$FindBin::Bin/../lib";
55 use File
::Basename
qw(dirname);
56 use File
::Path
qw(mkpath);
61 use Hash
::Util
qw(lock_keys);
64 lock_keys
%Opt, map { /([^=|!]+)/ } @opt;
74 my($distro, $desc) = split " ", $_, 2;
76 if ($distro =~ s/\.\.\.$//) {
79 $M{$type}{$distro} = $desc;
82 my @lines = do { open my $fh, "annotate.txt" or die; local $/ = "\n"; <$fh> };
83 open my $fh, ">", "annotate.txt" or die;
85 ANNO
: for my $line (@lines) {
86 my($distro) = $line =~ /(\S+)/;
87 if (exists $M{eq}{$distro}) {
91 for my $substr (keys %{$M{substr}}) {
92 if (substr($distro,0,length($substr)) eq $substr) {
100 warn "rewrote annotate.txt and skipped[$skipped]\n";
104 # cperl-indent-level: 4