blob: ec53c71158286402b98662ea09e1c2eb7f36b9a9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
my $hostroot = $config->get_hostroot();
sub getf ($) {
open my $f, $_[0] or die "$!: $_[0]\n";
my @slurp = <$f>;
close $f;
@slurp;
}
sub nl () { "<br />\n" }
sub list (*) {
my $tag = shift;
my @found = sort `find $hostroot -name $tag`;
my $ret = '';
for my $found (@found) {
$found =~ /.*hosts.(.*?).$tag/;
my $host = $1;
my @content = getf $found;
$ret .= "<b><a href=https://$host>$host</a></b>" . nl;
if (@content) {
$ret .= join " ", @content;
$ret .= nl;
}
$ret .= nl;
}
$ret;
}
my $ret = list PROJECT;
$ret .= "<b><i>Older projects (not active at the moment):</i></b>" . nl x 2;
$ret .= list OLDPROJECT;
$ret .= "<b><i>Obsolete projects (no work will be done anymore and the software may be broken):</i></b>" . nl x 2;
$ret .= list OBSOLETEPROJECT;
return $ret;
|