=================================================================== RCS file: /cvs/cvsweb/cvsweb.cgi,v retrieving revision 1.21 retrieving revision 1.25 diff -u -p -r1.21 -r1.25 --- cvsweb/cvsweb.cgi 1998/07/23 09:42:40 1.21 +++ cvsweb/cvsweb.cgi 1998/08/24 16:41:42 1.25 @@ -28,7 +28,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $fId$ +# $fId: cvsweb.cgi,v 1.24 1998/08/16 13:45:12 wosch Exp $ # @@ -62,15 +62,18 @@ require 'cgi-style.pl'; %CVSROOT = ( 'freebsd', '/home/ncvs', 'learn', '/c/learncvs', - 'mozilla', '/a/mozilla-cvs', ); %CVSROOTdescr = ( 'freebsd', 'FreeBSD', 'learn', 'Learn', - 'mozilla', 'Mozilla FreeBSD', ); +%mirrors = ( + 'Germany', 'http://www.de.freebsd.org/cgi/cvsweb.cgi', + 'Japan', 'http://www.jp.freebsd.org/www.freebsd.org/cgi/cvsweb.cgi', + ); + $cvstreedefault = 'freebsd'; $cvstree = $cvstreedefault; $cvsroot = $CVSROOT{"$cvstree"} || "/home/ncvs"; @@ -144,7 +147,7 @@ if (!-d $cvsroot) { { local(@foo, $i); local($scriptname) = $ENV{'SCRIPT_NAME'}; - foreach (keys %CVSROOT) { + foreach (sort keys %CVSROOT) { if (-d $CVSROOT{$_}) { push(@foo, $_); } @@ -161,6 +164,20 @@ if (!-d $cvsroot) { } +{ + local(@mirrors) = sort keys %mirrors;; + if ($#mirrors >= 0) { + $intro .= "

\nThis script is mirrored in:\n"; + local($m); + for($m = 0; $m <= $#mirrors; $m++) { + $intro .= qq($mirrors[$m]); + $intro .= ',' if $m != $#mirrors; + $intro .= "\n"; + } + } +} + + if (-d $fullname) { opendir(DIR, $fullname) || &fatal("404 Not Found","$where: $!"); @dir = readdir(DIR); @@ -173,8 +190,9 @@ if (-d $fullname) { print $shortinstr; } print "

"; - print "Current CVS tree: $cvstree
\n" - if $cvstree ne $cvstreedefault; + print "Current CVS tree: ", + ($CVSROOTdescr{"$cvstree"} ? $CVSROOTdescr{"$cvstree"} : + $cvstree), "
\n"; print "Current directory: /$where\n"; print "


\n"; # Using in this manner violates the HTML2.0 spec but