From 07c4d57d88b1b97d5ff8f247a8f45d99e32dd406 Mon Sep 17 00:00:00 2001 From: Tim Bishop Date: Sun, 26 Nov 2000 00:27:38 +0000 Subject: [PATCH] Tidied the script up a bit. --- cgi-bin/cvswww-extract.cgi | 38 ++++++++------------------------------ 1 file changed, 8 insertions(+), 30 deletions(-) diff --git a/cgi-bin/cvswww-extract.cgi b/cgi-bin/cvswww-extract.cgi index 6383c06..5269aa7 100755 --- a/cgi-bin/cvswww-extract.cgi +++ b/cgi-bin/cvswww-extract.cgi @@ -16,18 +16,9 @@ $query=new CGI; $site=$query->param('site'); # Settings -if(-e "/usr/local/proj/co600_10" && -d "/usr/local/proj/co600_10"){ - # Assuming on Raptor - my ($left) = "../webpages/left.inc"; - my ($title) = "../webpages/title.inc"; - my ($bottom) = "../webpages/bottom.inc"; -} -elsif (-e "/home/sites/www.i-scream.org.uk" && -d "/home/sites/www.i-scream.org.uk"){ - # Assuming on Main Site - my ($left) = "../left.inc"; - my ($title) = "../title.inc"; - my ($bottom) = "../bottom.inc"; -} +my ($left) = "http://www.i-scream.org.uk/left.inc"; +my ($title) = "http://www.i-scream.org.uk/title.inc"; +my ($bottom) = "http://www.i-scream.org.uk/bottom.inc"; print "Content-type: text/html\n\n"; @@ -38,13 +29,13 @@ print << "EOF"; cvswww-extract.cgi Script to extract webpages onto webserver Created by tdb1 20/10/2000 - Last modified 20/10/2000 + Last modified 25/11/2000 --> - The i-Scream Project CVS Website Extracter! + The i-Scream Project CVS Website Extracter @@ -54,7 +45,7 @@ print << "EOF"; EOF -&print_file($left); +print `wget -O - -q $left`; print << "EOF"; @@ -62,7 +53,7 @@ print << "EOF"; EOF -&print_file($title); +print `wget -O - -q $title`; print "
\n";
 
@@ -88,7 +79,7 @@ else{
 
 print "
\n"; -&print_file($bottom); +print `wget -O - -q $bottom`; print << "EOF"; @@ -102,16 +93,3 @@ print << "EOF"; EOF exit 0; - -sub print_file ($) { - my ($filename) = @_; - print `cat $filename`; -} - -sub print_file_old ($) { - my ($filename) = @_; - open(FILE, $filename) or die "Cannot open $filename: $!\n"; - while (my ($line) = ) { - print $line; - } -} -- 2.44.0