3 #---------------------------------------------------------
6 # Script to extract webpages onto webserver
7 # Written by Tim Bishop [tdb1@ukc.ac.uk] 20/10/2000
9 # Copyright i-Scream, 2000
10 # http://www.i-scream.org.uk
11 #---------------------------------------------------------
16 $site=$query->param('site');
19 if(-e "/usr/local/proj/co600_10" && -d "/usr/local/proj/co600_10"){
21 my ($left) = "../webpages/left.inc";
22 my ($title) = "../webpages/title.inc";
23 my ($bottom) = "../webpages/bottom.inc";
25 elsif (-e "/home/sites/www.i-scream.org.uk" && -d "/home/sites/www.i-scream.org.uk"){
26 # Assuming on Main Site
27 my ($left) = "../left.inc";
28 my ($title) = "../title.inc";
29 my ($bottom) = "../bottom.inc";
32 print "Content-type: text/html\n\n";
35 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
39 Script to extract webpages onto webserver
40 Created by tdb1 20/10/2000
41 Last modified 20/10/2000
47 <title>The i-Scream Project CVS Website Extracter!</title>
50 <body bgcolor="#ffffff" link="#0000ff" alink="#3333cc" vlink="#3333cc" text="#000066">
52 <table border="0" cellpadding="2" cellspacing="2">
69 #decide which site we're running on
70 if($site eq "raptor" && -e "/usr/local/proj/co600_10" && -d "/usr/local/proj/co600_10"){
72 print "<b>Debugging output from run on Raptor:</b>\n";
73 print `/usr/local/proj/co600_10/scripts/cvswww-extract-cmd`;
75 print "\n<b>Debugging output from cleanup:</b>\n";
76 print `/usr/local/proj/co600_10/scripts/cvswww-clean`;
79 elsif($site eq "main" && -e "/home/sites/www.i-scream.org.uk" && -d "/home/sites/www.i-scream.org.uk"){
81 print "<b>Debugging output from extract:</b>\n";
82 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`;
86 print "whoops, forget to say which site... or you lied :)\n";
108 print `cat $filename`;
111 sub print_file_old ($) {
113 open(FILE, $filename) or die "Cannot open $filename: $!\n";
114 while (my ($line) = <FILE>) {