3 # This little program produces a web page listing the cvs repositories
4 # available by ucgi cvsweb. It doesn't really separate code and
5 # configuration, so it's not installed by default with chiark-utils.
7 # This file is part of chiark-utils, a collection of useful programs
8 # used on chiark.greenend.org.uk.
11 # Copyright 2001 Ian Jackson <ian@chiark.greenend.org.uk>
13 # This is free software; you can redistribute it and/or modify it under the
14 # terms of the GNU General Public License as published by the Free Software
15 # Foundation; either version 3, or (at your option) any later version.
17 # This is distributed in the hope that it will be useful, but WITHOUT ANY
18 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
19 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
22 # You should have received a copy of the GNU General Public License along
23 # with this program; if not, consult the Free Software Foundation's
24 # website at www.fsf.org, or the GNU Project website at www.gnu.org.
27 print <<END or die $!;
28 Content-Type: text/html
31 <title>chiark public CVS</title>
32 <link rev="made" href="mailto:webmaster\@chiark.greenend.org.uk">
35 <h1><img src="/chiark/icon90.gif" border="0" width="128" height="64"
36 alt=""> chiark users' public CVS</h1>
40 open UL, "/etc/userlist" or die $!;
42 next if m/^\#/ or !m/\S/;
44 next unless readlink "/home/$user/public-cgi/cvsweb"
45 eq '/usr/local/lib/cvsweb';
47 $pc= "/home/$user/public-CVS/";
48 next unless opendir D, $pc;
49 while (defined($mod= readdir D)) {
50 next unless -d "$pc/$mod";
51 next if $mod =~ m/^\./;
53 print "<li><A href=\"/ucgi/~$user/cvsweb\">$user</A>" or die $!;
54 print " (<A href=\"/~$user/\">homepage</A>)" or die $!
55 if -d "/home/$user/public-html";
61 print " <A href=\"/ucgi/~$user/cvsweb/$mod/\">$mod</A>" or die $!;
64 print "</li>\n" or die $!;
69 print <<END or die $!;
74 <A HREF="mailto:$ENV{SERVER_ADMIN}">$ENV{SERVER_ADMIN}</A>;
75 <A href="/">chiark home page</A>