Added cvsweb mirrors.
This commit is contained in:
parent
e886733d14
commit
ad20be4d1f
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/www/; revision=3356
1 changed files with 20 additions and 1 deletions
|
@ -28,7 +28,7 @@
|
|||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
# $Id: cvsweb.cgi,v 1.23 1998-08-15 09:59:11 wosch Exp $
|
||||
# $Id: cvsweb.cgi,v 1.24 1998-08-16 13:45:12 wosch Exp $
|
||||
#
|
||||
|
||||
|
||||
|
@ -71,6 +71,11 @@ require 'cgi-style.pl';
|
|||
'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';
|
||||
$cvstree = $cvstreedefault;
|
||||
$cvsroot = $CVSROOT{"$cvstree"} || "/home/ncvs";
|
||||
|
@ -161,6 +166,20 @@ 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) {
|
||||
opendir(DIR, $fullname) || &fatal("404 Not Found","$where: $!");
|
||||
@dir = readdir(DIR);
|
||||
|
|
Loading…
Reference in a new issue