From 82ceb2d953cb114bffee7dfbfc87bc8fac8f20c5 Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Sat, 15 Nov 1997 16:48:07 +0000 Subject: [PATCH] Source the config file /usr/local/etc/cvsweb and /usr/local/etc/cvsweb-$cvsroot if exists. The config files are perl scripts. This make it possible to define local cvs roots, help messages, navigation bar and E-Mail addresses without changing the original cvsweb.cgi script. --- data/cgi/cvsweb.cgi | 4 ++++ en/cgi/cvsweb.cgi | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/data/cgi/cvsweb.cgi b/data/cgi/cvsweb.cgi index 6ff751ce17..9ad2f87a23 100755 --- a/data/cgi/cvsweb.cgi +++ b/data/cgi/cvsweb.cgi @@ -30,6 +30,7 @@ require 'ctime.pl'; $hsty_base = ""; require 'cgi-style.pl'; +#&get_the_source; %CVSROOT = ( 'freebsd', '/home/ncvs', @@ -89,6 +90,8 @@ if ($query = $ENV{'QUERY_STRING'}) { } +$config = '/usr/local/etc/cvsweb'; +do "$config" if -f $config; if ($input{'cvsroot'}) { if ($CVSROOT{$input{'cvsroot'}}) { @@ -96,6 +99,7 @@ if ($input{'cvsroot'}) { $cvsroot = $CVSROOT{"$cvstree"}; } } +do "$config-$cvstree" if -f "$config-$cvstree"; $fullname = $cvsroot . '/' . $where; if (!-d $cvsroot) { diff --git a/en/cgi/cvsweb.cgi b/en/cgi/cvsweb.cgi index 6ff751ce17..9ad2f87a23 100755 --- a/en/cgi/cvsweb.cgi +++ b/en/cgi/cvsweb.cgi @@ -30,6 +30,7 @@ require 'ctime.pl'; $hsty_base = ""; require 'cgi-style.pl'; +#&get_the_source; %CVSROOT = ( 'freebsd', '/home/ncvs', @@ -89,6 +90,8 @@ if ($query = $ENV{'QUERY_STRING'}) { } +$config = '/usr/local/etc/cvsweb'; +do "$config" if -f $config; if ($input{'cvsroot'}) { if ($CVSROOT{$input{'cvsroot'}}) { @@ -96,6 +99,7 @@ if ($input{'cvsroot'}) { $cvsroot = $CVSROOT{"$cvstree"}; } } +do "$config-$cvstree" if -f "$config-$cvstree"; $fullname = $cvsroot . '/' . $where; if (!-d $cvsroot) {