ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/web/cgi-bin/cvswww-extract.cgi
Revision: 1.3
Committed: Tue Jan 2 02:43:42 2001 UTC (23 years, 4 months ago) by tdb
Branch: MAIN
CVS Tags: PROJECT_COMPLETION
Changes since 1.2: +3 -3 lines
Log Message:
Added some paths...

File Contents

# User Rev Content
1 tdb 1.1 #!/usr/bin/perl
2    
3     #---------------------------------------------------------
4     # cvswww-extract.cgi
5     #
6     # Script to extract webpages onto webserver
7     # Written by Tim Bishop [tdb1@ukc.ac.uk] 20/10/2000
8     #
9     # Copyright i-Scream, 2000
10     # http://www.i-scream.org.uk
11     #---------------------------------------------------------
12    
13     #grab some info
14     use CGI;
15     $query=new CGI;
16     $site=$query->param('site');
17    
18     # Settings
19 tdb 1.2 my ($left) = "http://www.i-scream.org.uk/left.inc";
20     my ($title) = "http://www.i-scream.org.uk/title.inc";
21     my ($bottom) = "http://www.i-scream.org.uk/bottom.inc";
22 tdb 1.1
23     print "Content-type: text/html\n\n";
24    
25     print << "EOF";
26     <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
27    
28     <!--
29     cvswww-extract.cgi
30     Script to extract webpages onto webserver
31     Created by tdb1 20/10/2000
32 tdb 1.2 Last modified 25/11/2000
33 tdb 1.1 -->
34    
35     <html>
36    
37     <head>
38 tdb 1.2 <title>The i-Scream Project CVS Website Extracter</title>
39 tdb 1.1 </head>
40    
41     <body bgcolor="#ffffff" link="#0000ff" alink="#3333cc" vlink="#3333cc" text="#000066">
42    
43     <table border="0" cellpadding="2" cellspacing="2">
44     <tr>
45     <td valign="top">
46     EOF
47    
48 tdb 1.3 print `/usr/local/bin/wget -O - -q $left`;
49 tdb 1.1
50     print << "EOF";
51    
52     </td>
53     <td valign="top">
54     EOF
55    
56 tdb 1.3 print `/usr/local/bin/wget -O - -q $title`;
57 tdb 1.1
58     print "<pre>\n";
59    
60     #decide which site we're running on
61     if($site eq "raptor" && -e "/usr/local/proj/co600_10" && -d "/usr/local/proj/co600_10"){
62    
63     print "<b>Debugging output from run on Raptor:</b>\n";
64     print `/usr/local/proj/co600_10/scripts/cvswww-extract-cmd`;
65    
66     print "\n<b>Debugging output from cleanup:</b>\n";
67     print `/usr/local/proj/co600_10/scripts/cvswww-clean`;
68    
69     }
70     elsif($site eq "main" && -e "/home/sites/www.i-scream.org.uk" && -d "/home/sites/www.i-scream.org.uk"){
71    
72     print "<b>Debugging output from extract:</b>\n";
73     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`;
74    
75     }
76     else{
77     print "whoops, forget to say which site... or you lied :)\n";
78     }
79    
80     print "</pre>\n";
81    
82 tdb 1.3 print `/usr/local/bin/wget -O - -q $bottom`;
83 tdb 1.1
84     print << "EOF";
85    
86     </td>
87     </tr>
88     </table>
89    
90     </body>
91    
92     </html>
93     EOF
94    
95     exit 0;