2002-05-27 14:22:23 +00:00
|
|
|
#!/usr/bin/perl
|
|
|
|
|
2004-10-01 06:17:18 +00:00
|
|
|
require "rockbox.pm";
|
|
|
|
|
2003-07-25 08:13:16 +00:00
|
|
|
my $basedir = "/home/dast/rockbox-build/daily-build";
|
2002-05-27 14:22:23 +00:00
|
|
|
|
2004-10-26 14:12:37 +00:00
|
|
|
my @list=("player", "recorder", "fmrecorder", "recorderv2",
|
|
|
|
"recorder8mb", "fmrecorder8mb", "ondiofm", "ondiosp");
|
2002-05-27 14:22:23 +00:00
|
|
|
|
2003-07-25 08:13:16 +00:00
|
|
|
for(@list) {
|
|
|
|
my $dir = $_;
|
2004-10-01 06:17:18 +00:00
|
|
|
opendir(DIR, "$basedir/$dir") or next;
|
2003-08-03 23:13:12 +00:00
|
|
|
my @files = sort grep { /^rockbox/ } readdir(DIR);
|
2002-05-27 14:22:23 +00:00
|
|
|
closedir DIR;
|
2003-07-25 08:13:16 +00:00
|
|
|
|
|
|
|
for(@files) {
|
2003-08-03 22:52:58 +00:00
|
|
|
/(20\d+)/;
|
2003-07-25 08:13:16 +00:00
|
|
|
$date{$1}=$1;
|
2002-05-27 14:22:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-10-01 06:17:18 +00:00
|
|
|
$color1 = 0xc6;
|
|
|
|
$color2 = 0xd6;
|
|
|
|
$color3 = 0xf5;
|
|
|
|
$font1 = "<b>";
|
|
|
|
$font2 = "</b>";
|
2003-02-03 12:28:28 +00:00
|
|
|
|
2003-07-25 08:13:16 +00:00
|
|
|
for(reverse sort keys %date) {
|
|
|
|
my $d = $_;
|
|
|
|
my $nice = $d;
|
|
|
|
if($d =~ /(\d\d\d\d)(\d\d)(\d\d)/) {
|
|
|
|
$nice = "$1-$2-$3";
|
|
|
|
}
|
2004-10-01 06:17:18 +00:00
|
|
|
$col = sprintf("style=\"background-color: #%02x%02x%02x\"",
|
|
|
|
$color1, $color2, $color3);
|
|
|
|
print "<h2>Download daily build</h2>\n";
|
|
|
|
print "<table class=rockbox><tr valign=top>\n";
|
|
|
|
|
|
|
|
$color1 -= 0x18;
|
|
|
|
$color2 -= 0x18;
|
|
|
|
$color3 -= 0x18;
|
2003-07-25 08:13:16 +00:00
|
|
|
|
|
|
|
for(@list) {
|
|
|
|
my $n=0;
|
2003-08-03 23:13:12 +00:00
|
|
|
my $m = $_;
|
2004-10-01 06:17:18 +00:00
|
|
|
printf "<td $col>$font1$m$font2<br><img src=\"$model{$m}\"><br>";
|
2003-08-03 23:13:12 +00:00
|
|
|
# new-style full zip:
|
|
|
|
if( -f "daily/$m/rockbox-${m}-${d}.zip") {
|
2004-10-01 06:17:18 +00:00
|
|
|
printf "%s<a href=\"daily/$_/rockbox-${m}-${d}.zip\">latest</a>",
|
2003-07-25 08:13:16 +00:00
|
|
|
$n?", ":"";
|
|
|
|
$n++;
|
|
|
|
}
|
2004-10-01 06:17:18 +00:00
|
|
|
print "$font2 <p><a href=\"dl.cgi?bin=$_\">old versions</a></td>\n";
|
2003-07-25 08:13:16 +00:00
|
|
|
}
|
2004-10-01 06:17:18 +00:00
|
|
|
printf "<td $col>${font1}windows installer$font2<br><img src=\"$model{install}\"><br>";
|
|
|
|
print "<a href=\"daily/Rockbox-${d}-install.exe\">latest</a>",
|
|
|
|
"<p><a href=\"dl.cgi?bin=install\">old versions</a></td>";
|
|
|
|
print "</tr>\n";
|
|
|
|
$font1 = $font2 = "";
|
|
|
|
last;
|
2003-07-25 08:13:16 +00:00
|
|
|
}
|
|
|
|
print "</table>\n";
|
2003-03-20 07:32:06 +00:00
|
|
|
|