From 32c55a04768e468b83f9e6dfdd21d84a7d234b9f Mon Sep 17 00:00:00 2001 From: Tim Bishop Date: Fri, 9 Mar 2001 00:22:30 +0000 Subject: [PATCH] CGI scripts used in various places around the project. --- cgi-bin/cvslog.cgi | 66 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100755 cgi-bin/cvslog.cgi diff --git a/cgi-bin/cvslog.cgi b/cgi-bin/cvslog.cgi new file mode 100755 index 0000000..e822a31 --- /dev/null +++ b/cgi-bin/cvslog.cgi @@ -0,0 +1,66 @@ +#!/usr/bin/perl + +print "Content-type: text/html\n\n"; + +my($today) = `date \"+%Y/%m/%d\"`; +my($cvs2clpath) = "/home/cut/tdb1/bin/cvs2cl"; +my($cvsroot) = "/usr/local/proj/co600_10/cvs"; +my($cvs2clargs) = "--stdout -r -b -t -w -U $cvsroot/CVSROOT/users -l \"-d'\>$today'\" -g \"-d$cvsroot\" -g \"-Q\""; +my($cmd) = "cd /home/cut/tdb1/cvsscripttemp && $cvs2clpath $cvs2clargs *"; + +my(@lines) = `$cmd`; + +print <<"END"; + + + + + + The i-scream Project Logfile Tailer + + + + + + + + + +

Today's i-scream CVS commits

+ +Browse i-scream CVS repository + +
+END
+
+foreach my $line (@lines) {
+    print HTML_encode($line);
+}
+
+print <<"END";
+
+ + + +END + +exit 0; + +#------------------------------------------------------ +# sub HTML_encode +# +# escape HTML characters that may cause problems when +# shown either in the or within text fields. +#------------------------------------------------------ +sub HTML_encode ($){ + my ($encoded) = @_; + $encoded =~ s/&/&/g; + $encoded =~ s/"/"/g; + $encoded =~ s//>/g; + return $encoded; +} + -- 2.44.0