Moved battery_level() to the end, where it doesn't break backwards compatibility
[kugel-rb.git] / www / dailymod.pl
bloba02e6be1b81aa26c50e609a86fba3ee063e7b00b
1 #!/usr/bin/perl
3 my $basedir = "/home/dast/rockbox-build/daily-build";
5 my @list=("player", "recorder", "fmrecorder", "recorderv2", "recorder8mb");
7 for(@list) {
8 my $dir = $_;
9 opendir(DIR, "$basedir/$dir") or
10 die "Can't opendir($basedir/$dir)";
11 my @files = sort grep { /^rockbox/ } readdir(DIR);
12 closedir DIR;
14 for(@files) {
15 /(20\d+)/;
16 $date{$1}=$1;
20 print "<table class=rockbox>\n";
22 if (0) {
23 print "<tr><th>date</th>";
25 for(@list) {
26 print "<th>$_</th>";
30 for(reverse sort keys %date) {
31 my $d = $_;
32 my $nice = $d;
33 if($d =~ /(\d\d\d\d)(\d\d)(\d\d)/) {
34 $nice = "$1-$2-$3";
36 print "</tr>\n<tr><td>$nice</td>";
38 for(@list) {
39 my $n=0;
40 my $m = $_;
41 print "<td> ";
42 # new-style full zip:
43 if( -f "daily/$m/rockbox-${m}-${d}.zip") {
44 printf "%s<a href=\"daily/$_/rockbox-${m}-${d}.zip\">${m}</a>",
45 $n?", ":"";
46 $n++;
48 print "</td>";
50 print "</tr>\n"
52 print "</table>\n";