11 my $reports = '/home/sources/reports';
12 my @status_files = split("\n", `find $reports -maxdepth 2 -name status.txt`);
15 open(my $fh, '>', "$reports/index.html")
16 or die "Could not open '$reports/index.html' for writing: $!";
18 print $fh start_html("Source Repository for GRML");
19 print $fh "<center><h1><a href='http://grml.org/'>GRML</a> Source Repository</h1><br><br>";
20 my $t = new HTML::Table(
23 -head=> ['Release','Packages','Sources', 'Errors', 'Last updated', 'source.list entry'],
26 foreach my $releasefile (@status_files) {
27 open (my $pfh, '<', "$releasefile")
28 or die "Could not open statusfile '$releasefile': $!";
29 my ($release, $packages, $sources, $errors, $lastupdated, $baseurl);
32 if (/^Updated: (.*)$/) { $lastupdated = $1; next;}
33 if (/^Sources: (.*)$/) { $sources = $1; next; }
34 if (/^Title: (.*)$/) { $release = $1; next; }
35 if (/^Errors: (.*)$/) { $errors = $1; next; }
36 if (/^Packages: (.*)$/) { $packages = $1; next; }
37 if (/^Baseurl: (.*)$/) { $baseurl = $1; next; }
39 $t->addRow( "<a href='$baseurl'>$release</a>",
44 "deb-src $baseurl ./",