1 |
tdb |
1.1 |
#include <stdio.h> |
2 |
|
|
|
3 |
|
|
//--------------------------------------------------------- |
4 |
|
|
// cvswww-send-cmd.c |
5 |
|
|
// |
6 |
|
|
// Script to export webpages from CVS and ftp to 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 |
|
|
|
14 |
|
|
int main() { |
15 |
|
|
|
16 |
|
|
//make temp directory |
17 |
|
|
system("cd /tmp && mkdir cvswww-send-tmp && cd cvswww-send-tmp && mkdir www"); |
18 |
|
|
//quick permissions change! |
19 |
|
|
//system("cd /tmp && chmod 700 cvswww-send-tmp"); |
20 |
|
|
//extract www |
21 |
|
|
system("cd /tmp/cvswww-send-tmp && /usr/local/bin/cvs -d /usr/local/proj/co600_10/cvs export -d www -r HEAD web/website/www"); |
22 |
|
|
|
23 |
|
|
//setup some more dirs |
24 |
|
|
system("cd /tmp/cvswww-send-tmp/www && mkdir cgi-bin"); |
25 |
|
|
//extract cgi-bin |
26 |
|
|
system("cd /tmp/cvswww-send-tmp/www && /usr/local/bin/cvs -d /usr/local/proj/co600_10/cvs export -d cgi-bin -r HEAD web/website/cgi-bin"); |
27 |
|
|
|
28 |
|
|
//setup some more dirs |
29 |
|
|
system("cd /tmp/cvswww-send-tmp/www && mkdir documentation"); |
30 |
|
|
//extract docs (/documentation) |
31 |
|
|
system("cd /tmp/cvswww-send-tmp/www && /usr/local/bin/cvs -d /usr/local/proj/co600_10/cvs export -d documentation -r HEAD documentation"); |
32 |
|
|
|
33 |
|
|
//drop the server javadoc pages in |
34 |
|
|
system("echo && cd /tmp/cvswww-send-tmp/www/javadoc && /usr/local/bin/gnutar -zxvf /usr/local/proj/co600_10/javadoc/server.tar.gz"); |
35 |
|
|
system("echo && cd /tmp/cvswww-send-tmp/www/javadoc && /usr/local/bin/gnutar -zxvf /usr/local/proj/co600_10/javadoc/conient.tar.gz"); |
36 |
|
|
system("echo && cd /tmp/cvswww-send-tmp/www/javadoc && /usr/local/bin/gnutar -zxvf /usr/local/proj/co600_10/javadoc/corbaservices.tar.gz"); |
37 |
tdb |
1.2 |
system("echo && cd /tmp/cvswww-send-tmp/www/javadoc && /usr/local/bin/gnutar -zxvf /usr/local/proj/co600_10/javadoc/dbreporter.tar.gz"); |
38 |
tdb |
1.1 |
|
39 |
|
|
//create tar file (and gzip) |
40 |
|
|
system("echo && cd /tmp/cvswww-send-tmp/www && /usr/local/bin/gnutar --numeric-owner --owner=136 --group=119 -cvf /tmp/cvswww-send-tmp/cvswww-extract.tar * && /usr/local/bin/gzip -9 /tmp/cvswww-send-tmp/cvswww-extract.tar"); |
41 |
|
|
|
42 |
|
|
return 0; |
43 |
|
|
} |