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