version 1.21, 1998/07/23 09:42:40 |
version 1.25, 1998/08/24 16:41:42 |
|
|
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
# SUCH DAMAGE. |
# SUCH DAMAGE. |
# |
# |
# $fId$ |
# $fId: cvsweb.cgi,v 1.24 1998/08/16 13:45:12 wosch Exp $ |
# |
# |
|
|
|
|
Line 62 require 'cgi-style.pl'; |
|
Line 62 require 'cgi-style.pl'; |
|
%CVSROOT = ( |
%CVSROOT = ( |
'freebsd', '/home/ncvs', |
'freebsd', '/home/ncvs', |
'learn', '/c/learncvs', |
'learn', '/c/learncvs', |
'mozilla', '/a/mozilla-cvs', |
|
); |
); |
|
|
%CVSROOTdescr = ( |
%CVSROOTdescr = ( |
'freebsd', 'FreeBSD', |
'freebsd', 'FreeBSD', |
'learn', 'Learn', |
'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'; |
$cvstreedefault = 'freebsd'; |
$cvstree = $cvstreedefault; |
$cvstree = $cvstreedefault; |
$cvsroot = $CVSROOT{"$cvstree"} || "/home/ncvs"; |
$cvsroot = $CVSROOT{"$cvstree"} || "/home/ncvs"; |
Line 144 if (!-d $cvsroot) { |
|
Line 147 if (!-d $cvsroot) { |
|
{ |
{ |
local(@foo, $i); |
local(@foo, $i); |
local($scriptname) = $ENV{'SCRIPT_NAME'}; |
local($scriptname) = $ENV{'SCRIPT_NAME'}; |
foreach (keys %CVSROOT) { |
foreach (sort keys %CVSROOT) { |
if (-d $CVSROOT{$_}) { |
if (-d $CVSROOT{$_}) { |
push(@foo, $_); |
push(@foo, $_); |
} |
} |
Line 161 if (!-d $cvsroot) { |
|
Line 164 if (!-d $cvsroot) { |
|
} |
} |
|
|
|
|
|
{ |
|
local(@mirrors) = sort keys %mirrors;; |
|
if ($#mirrors >= 0) { |
|
$intro .= "<p>\nThis script is mirrored in:\n"; |
|
local($m); |
|
for($m = 0; $m <= $#mirrors; $m++) { |
|
$intro .= qq(<a href="$mirrors{$mirrors[$m]}">$mirrors[$m]</a>); |
|
$intro .= ',' if $m != $#mirrors; |
|
$intro .= "\n"; |
|
} |
|
} |
|
} |
|
|
|
|
if (-d $fullname) { |
if (-d $fullname) { |
opendir(DIR, $fullname) || &fatal("404 Not Found","$where: $!"); |
opendir(DIR, $fullname) || &fatal("404 Not Found","$where: $!"); |
@dir = readdir(DIR); |
@dir = readdir(DIR); |
Line 173 if (-d $fullname) { |
|
Line 190 if (-d $fullname) { |
|
print $shortinstr; |
print $shortinstr; |
} |
} |
print "<p>"; |
print "<p>"; |
print "Current CVS tree: <b>$cvstree</b><br>\n" |
print "Current CVS tree: <b>", |
if $cvstree ne $cvstreedefault; |
($CVSROOTdescr{"$cvstree"} ? $CVSROOTdescr{"$cvstree"} : |
|
$cvstree), "</b><br>\n"; |
print "Current directory: <b>/$where</b>\n"; |
print "Current directory: <b>/$where</b>\n"; |
print "<P><HR NOSHADE>\n"; |
print "<P><HR NOSHADE>\n"; |
# Using <MENU> in this manner violates the HTML2.0 spec but |
# Using <MENU> in this manner violates the HTML2.0 spec but |