#!/usr/bin/perl require "rockbox.pm"; my $basedir = "/home/dast/rockbox-build/daily-build"; my @list=("player", "recorder", "fmrecorder", "recorderv2", "recorder8mb", "fmrecorder8mb", "ondiofm", "ondiosp"); for(@list) { my $dir = $_; opendir(DIR, "$basedir/$dir") or next; my @files = sort grep { /^rockbox/ } readdir(DIR); closedir DIR; for(@files) { /(20\d+)/; $date{$1}=$1; } } $color1 = 0xc6; $color2 = 0xd6; $color3 = 0xf5; $font1 = ""; $font2 = ""; 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 "

Download daily build

\n"; print "\n"; $color1 -= 0x18; $color2 -= 0x18; $color3 -= 0x18; for(@list) { my $n=0; my $m = $_; printf "\n"; } printf ""; print "\n"; $font1 = $font2 = ""; last; } print "
$font1$m$font2

"; # new-style full zip: if( -f "daily/$m/rockbox-${m}-${d}.zip") { printf "%slatest", $n?", ":""; $n++; } print "$font2

old versions

${font1}windows installer$font2

"; print "latest", "

old versions

\n";