=================================================================== RCS file: /cvs/cvsweb/cvsweb.cgi,v retrieving revision 1.12 retrieving revision 1.16 diff -u -p -r1.12 -r1.16 --- cvsweb/cvsweb.cgi 1997/11/19 19:07:18 1.12 +++ cvsweb/cvsweb.cgi 1998/04/06 15:50:27 1.16 @@ -36,8 +36,16 @@ require 'cgi-style.pl'; 'freebsd', '/home/ncvs', 'openbsd', '/home/OpenBSD/cvs', 'learn', '/c/learncvs', + 'mozilla', '/a/mozilla-cvs', ); +%CVSROOTdescr = ( + 'freebsd', 'FreeBSD', + 'openbsd', 'OpenBSD', + 'learn', 'Learn', + 'mozilla', 'Mozilla FreeBSD', + ); + $cvstreedefault = 'freebsd'; $cvstree = $cvstreedefault; $cvsroot = $CVSROOT{"$cvstree"} || "/home/ncvs"; @@ -107,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); @@ -118,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 "