diff options
author | Björn Stenberg <bjorn@haxx.se> | 2006-01-30 09:56:08 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2006-01-30 09:56:08 +0000 |
commit | 733c14d60ee0f16681b10bf230e78089ccd51ec9 (patch) | |
tree | 424dc992589ed604702d194db36341c203d8d069 /www/dailymod.pl | |
parent | 5f3b122eddbd32e88c7c62559b96b00aea85636b (diff) |
changed ages ago
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8493 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'www/dailymod.pl')
-rwxr-xr-x | www/dailymod.pl | 68 |
1 files changed, 45 insertions, 23 deletions
diff --git a/www/dailymod.pl b/www/dailymod.pl index 318149b975..9e3d118ba2 100755 --- a/www/dailymod.pl +++ b/www/dailymod.pl @@ -4,8 +4,15 @@ require "rockbox.pm"; my $basedir = "/home/dast/rockbox-build/daily-build"; -my @list=("player", "recorder", "fmrecorder", "recorderv2", - "recorder8mb", "fmrecorder8mb", "ondiofm", "ondiosp"); +my @list=("player", + "recorder", "recorder8mb", + "fmrecorder", "fmrecorder8mb", + "recorderv2", + "ondiofm", "ondiosp", + "h100", "h120", "h300", "ipodcolor", "ipodnano", + + # install and source are special cases + "install", "source"); for(@list) { my $dir = $_; @@ -19,44 +26,59 @@ for(@list) { } } -$color1 = 0xc6; -$color2 = 0xd6; -$color3 = 0xf5; -$font1 = "<b>"; -$font2 = "</b>"; - for(reverse sort keys %date) { my $d = $_; my $nice = $d; if($d =~ /(\d\d\d\d)(\d\d)(\d\d)/) { $nice = "$1-$2-$3"; } - $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"; + print "<table class=rockbox cellpadding=\"0\"><tr valign=top>\n"; $color1 -= 0x18; $color2 -= 0x18; $color3 -= 0x18; + my $count = 0; + my $split = int((scalar @list) / 2); + my $x = 0; + my @head; + + foreach $t (@list) { + my $show = $t; + $show =~ s/recorder/rec/; + # Remove the comment below to get long names + # $show = $longname{$t}; + $head[$x] .= "<th>$show</th>\n"; + $count++; + if ($count == $split) { + $x++; + } + } + print "$head[0]</tr><tr>\n"; + + $count = 0; for(@list) { - my $n=0; my $m = $_; - printf "<td $col>$font1$m$font2<br><img src=\"$model{$m}\"><br>"; + printf "<td><img alt=\"$m\" src=\"$model{$m}\"><br>"; # new-style full zip: - if( -f "daily/$m/rockbox-${m}-${d}.zip") { - printf "%s<a href=\"daily/$_/rockbox-${m}-${d}.zip\">latest</a>", - $n?", ":""; - $n++; + my $file = "rockbox-${m}-${d}.zip"; + if($m eq "source") { + $file = "rockbox-daily-${d}.tar.gz"; + } + elsif($m eq "install") { + $file = "Rockbox-${d}-install.exe"; } - print "$font2 <p><a href=\"dl.cgi?bin=$_\">old versions</a></td>\n"; + if( -f "$basedir/$m/$file") { + printf "<a href=\"/daily/$_/$file\">latest</a>", + } + print "<p><a href=\"/dl.cgi?bin=$_\">older</a></td>\n"; + + $count++; + if ($count == $split) { + print "</tr><tr>$head[1]</tr><tr>\n"; + } } - 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; } print "</table>\n"; |