===================================================================
RCS file: /cvs/cvsweb/cvsweb.cgi,v
retrieving revision 3.6
retrieving revision 3.11
diff -u -p -r3.6 -r3.11
--- cvsweb/cvsweb.cgi 2000/07/28 21:38:45 3.6
+++ cvsweb/cvsweb.cgi 2000/08/13 18:58:24 3.11
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -ws
+#!/usr/bin/perl5 -ws
#
# cvsweb - a CGI interface to CVS trees.
#
@@ -41,7 +41,8 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# $Id: cvsweb.cgi,v 3.6 2000/07/28 21:38:45 knu Exp $
+# $zId: cvsweb.cgi,v 1.93 2000/07/27 17:42:28 hzeller Exp $
+# $Id: cvsweb.cgi,v 3.11 2000/08/13 18:58:24 knu Exp $
#
###
@@ -79,10 +80,16 @@ use vars qw (
);
##### Start of Configuration Area ########
+use Cwd;
+
# == EDIT this ==
# User configuration is stored in
-$config = defined($ENV{CVSWEB_CONFIG}) ? $ENV{CVSWEB_CONFIG} : '/usr/local/etc/cvsweb.conf';
+$config = undef;
+for ($ENV{CVSWEB_CONFIG}, '/usr/local/etc/cvsweb.conf', getcwd . '/cvsweb.conf') {
+ $config = $_ if -r $_;
+}
+
# == Configuration defaults ==
# Defaults for configuration variables that shouldn't need
# to be configured..
@@ -854,8 +861,8 @@ sub htmlify {
# get #PR as link ..
if ($pr && defined($prcgi)) {
- 1 while $string =~ s`\b(pr[:#]?\s*(?:#?\d+[,\s]\s*)*#?)(\d+)\b`$1$2`i;
- $string =~ s`\b${prcategories}/(\d+)\b`$&`igo;
+ 1 while $string =~ s`\b(pr[:#]?\s*(?:#?\d+[,\s]\s*)*#?)(\d+)\b`$1$2`i;
+ $string =~ s`\b${prcategories}/(\d+)\b`$&`igo;
}
return $string;
@@ -1472,15 +1479,15 @@ sub getDirLogs {
if ($tag) {
#can't use -r as - is allowed in tagnames, but misinterpreated by rlog..
if (! open($fh, "-|")) {
- close(STDERR); # rlog may complain; ignore.
- exec("rlog",@files);
+ open(STDERR, '>/dev/null'); # rlog may complain; ignore.
+ exec('rlog', @files);
}
}
else {
my $kidpid = open($fh, "-|");
if (! $kidpid) {
open(STDERR, '>/dev/null'); # rlog may complain; ignore.
- exec("rlog","-r",@files);
+ exec('rlog', '-r', @files);
}
}
$state = "start";
@@ -2329,7 +2336,7 @@ sub navigateHeader ($$$$$) {
$swhere = urlencode($filename) if ($swhere eq "");
print "<\!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">";
print "\n\n";
- print '';
+ print '';
print "\n$path$filename - $title - $rev\n";
print "\n";
print "";
@@ -2683,7 +2690,7 @@ sub http_header {
sub html_header($) {
my ($title) = @_;
- my $version = '$Revision: 3.6 $';
+ my $version = '$zRevision: 1.93 $ $Revision: 3.11 $';
http_header();
print <