#!/usr/bin/perl
$basedir = "/home/dast/rockbox-build/daily-build/";
opendir(DIR, $basedir) or
die "Can't opendir($basedir)";
@tarballs = sort grep { /^rockbox-daily-/ } readdir(DIR);
closedir DIR;
print "
\n";
for ( sort {$b <=> $a} @tarballs ) {
$size = (stat("$basedir/$_"))[7];
$log = "";
if (/-(\d+)/) {
$date = $1;
if ( -f "$basedir/changes-$date.txt") {
$lines = `grep "Number of changes:" $basedir/changes-$date.txt | cut "-d " -f4` + 0;
$log = "Changelog ($lines changes)";
}
}
print "- $_ ($size bytes) $log\n";
}
print "
\n";