--- web/cgi-bin/cvswww-extract.cgi 2000/10/26 00:16:37 1.1 +++ web/cgi-bin/cvswww-extract.cgi 2001/05/06 19:16:40 1.4 @@ -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 06/05/2001 -->
-\n"; @@ -70,16 +61,16 @@ print "\n"; if($site eq "raptor" && -e "/usr/local/proj/co600_10" && -d "/usr/local/proj/co600_10"){ print "Debugging output from run on Raptor:\n"; -print `/usr/local/proj/co600_10/scripts/cvswww-extract-cmd`; +print `/usr/local/proj/co600_10/scripts/cvswww-extract-cmd 2>&1`; print "\nDebugging output from cleanup:\n"; -print `/usr/local/proj/co600_10/scripts/cvswww-clean`; +print `/usr/local/proj/co600_10/scripts/cvswww-clean 2>&1`; } elsif($site eq "main" && -e "/home/sites/www.i-scream.org.uk" && -d "/home/sites/www.i-scream.org.uk"){ print "Debugging output from extract:\n"; -print `cd /home/sites/www.i-scream.org.uk/web && gunzip cvswww-extract.tar.gz && tar -xvf cvswww-extract.tar && rm -f cvswww-extract.tar`; +print `cd /home/sites/www.i-scream.org.uk/web && gunzip cvswww-extract.tar.gz && tar -xvf cvswww-extract.tar && rm -f cvswww-extract.tar 2>&1`; } else{ @@ -88,7 +79,7 @@ else{ print "\n"; -&print_file($bottom); +print `/usr/local/bin/wget -O - -q $bottom 2>&1`; 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; - } -}