| 1 |
#!/usr/bin/perl |
| 2 |
use warnings; |
| 3 |
use strict; |
| 4 |
use integer; |
| 5 |
use FindBin; |
| 6 |
|
| 7 |
our @kind = ( |
| 8 |
{ cmd => 'md5sum' , name => 'MD5Sum' }, |
| 9 |
{ cmd => 'sha1sum' , name => 'SHA1' }, |
| 10 |
{ cmd => 'sha256sum', name => 'SHA256' }, |
| 11 |
); |
| 12 |
|
| 13 |
chdir "${FindBin::RealBin}/debian"; |
| 14 |
my @file = grep { !m%^dists/[^/]+/Release$% } |
| 15 |
map { my $f = $_; chomp $f; $f =~ s%^\./%%; $f; } |
| 16 |
sort `find . -mindepth 2 -type f`; |
| 17 |
|
| 18 |
for my $kind (@kind) { |
| 19 |
print $kind->{name} . ":\n"; |
| 20 |
for my $file (@file) { |
| 21 |
my $cmd = "${FindBin::RealBin}/calculate-sum Release " |
| 22 |
. $kind->{cmd} . " $file"; |
| 23 |
print `${cmd}`; |
| 24 |
} |
| 25 |
} |