=================================================================== RCS file: /cvs/cvsweb/cvsweb.cgi,v retrieving revision 1.15 retrieving revision 1.16 diff -u -p -r1.15 -r1.16 --- cvsweb/cvsweb.cgi 1998/04/05 10:20:37 1.15 +++ cvsweb/cvsweb.cgi 1998/04/06 15:50:27 1.16 @@ -39,6 +39,13 @@ require 'cgi-style.pl'; 'mozilla', '/a/mozilla-cvs', ); +%CVSROOTdescr = ( + 'freebsd', 'FreeBSD', + 'openbsd', 'OpenBSD', + 'learn', 'Learn', + 'mozilla', 'Mozilla FreeBSD', + ); + $cvstreedefault = 'freebsd'; $cvstree = $cvstreedefault; $cvsroot = $CVSROOT{"$cvstree"} || "/home/ncvs"; @@ -108,6 +115,26 @@ if (!-d $cvsroot) { } +{ + local(@foo, $i); + local($scriptname) = $ENV{'SCRIPT_NAME'}; + foreach (keys %CVSROOT) { + if (-d $CVSROOT{$_}) { + push(@foo, $_); + } + } + if ($#foo > 1) { + $intro .= "

\nThis script support the following CVS trees:\n"; + for($i = 0; $i <= $#foo; $i++) { + $intro .= qq{} . + ($CVSROOTdescr{$foo[$i]} ? + $CVSROOTdescr{$foo[$i]} : $foo[$i]) . qq{} . + ($i == $#foo ? ".\n" : ",\n"); + } + } +} + + if (-d $fullname) { opendir(DIR, $fullname) || &fatal("404 Not Found","$where: $!"); @dir = readdir(DIR); @@ -119,7 +146,10 @@ if (-d $fullname) { print &html_header("/$where"); print $shortinstr; } - print "

Current directory: /$where\n"; + print "

"; + print "Current CVS tree: $cvstree
\n" + if $cvstree ne $cvstreedefault; + print "Current directory: /$where\n"; print "


\n"; # Using in this manner violates the HTML2.0 spec but # provides the results that I want in most browsers. Another