version 1.21, 1998/07/23 09:42:40 |
version 1.24, 1998/08/16 13:45:12 |
|
|
# 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.23 1998/08/15 09:59:11 wosch Exp $ |
# |
# |
|
|
|
|
Line 71 require 'cgi-style.pl'; |
|
Line 71 require 'cgi-style.pl'; |
|
'mozilla', 'Mozilla FreeBSD', |
'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 149 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 166 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 192 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 |