X-Git-Url: https://git.donarmstrong.com/?p=bugscan.git;a=blobdiff_plain;f=make-britney-counts;h=e541426384d7f6a6c67849ecdf788b3a5ed839ee;hp=1c5705584b62d075e1e4b6d521a23643797eb28c;hb=HEAD;hpb=5b1d396f8f09c314859583a8f8b96876e043f2cd diff --git a/make-britney-counts b/make-britney-counts index 1c57055..e541426 100755 --- a/make-britney-counts +++ b/make-britney-counts @@ -4,8 +4,10 @@ # Generate a report britney can use use Getopt::Std; -require scanlib; -require bugcfg; +use File::Basename; +use lib dirname(__FILE__); +use bugcfg; +use scanlib; use strict; # use warnings; @@ -65,8 +67,10 @@ for my $pkg (sort keys %testingbugs) { print TESTING "$pkg ", scalar @{$testingbugs{$pkg}}, "\n"; print TESTINGNR "$pkg ", join(',', @{$testingbugs{$pkg}}), "\n"; } -close TESTING; -close TESTINGNR; +close TESTING + or die "close britney/testing.new: $!"; +close TESTINGNR + or die "close britney/testing-nr.new: $!"; open UNSTABLE, ">", "britney/unstable.new" or die "britney/unstable.new: $!"; @@ -76,8 +80,10 @@ for my $pkg (sort keys %unstablebugs) { print UNSTABLE "$pkg ", scalar @{$unstablebugs{$pkg}}, "\n"; print UNSTABLENR "$pkg ", join(',', @{$unstablebugs{$pkg}}), "\n"; } -close UNSTABLE; -close UNSTABLENR; +close UNSTABLE + or die "close britney/unstable.new: $!"; +close UNSTABLENR + or die "close britney/unstable-nr.new: $!"; rename "britney/testing.new", "britney/testing" or die "renaming britney/testing.new to britney/testing: $!";