=================================================================== RCS file: /cvs/cvsweb/cvsweb.cgi,v retrieving revision 1.12 retrieving revision 1.20 diff -u -p -r1.12 -r1.20 --- cvsweb/cvsweb.cgi 1997/11/19 19:07:18 1.12 +++ cvsweb/cvsweb.cgi 1998/07/23 08:50:52 1.20 @@ -34,10 +34,16 @@ require 'cgi-style.pl'; %CVSROOT = ( 'freebsd', '/home/ncvs', - 'openbsd', '/home/OpenBSD/cvs', 'learn', '/c/learncvs', + 'mozilla', '/a/mozilla-cvs', ); +%CVSROOTdescr = ( + 'freebsd', 'FreeBSD', + 'learn', 'Learn', + 'mozilla', 'Mozilla FreeBSD', + ); + $cvstreedefault = 'freebsd'; $cvstree = $cvstreedefault; $cvsroot = $CVSROOT{"$cvstree"} || "/home/ncvs"; @@ -57,7 +63,8 @@ display diffs between arbitrary revisions.
If you would like to use this CGI script on your own web server and CVS tree, see -the CVSWeb distribution site. +the CVSWeb distribution site or the current FreeBSD version.
Please send any suggestions, comments, etc. to Bill Fenner <fenner\@freebsd.org> @@ -107,6 +114,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 +145,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 "