Code

initial
[rrdtool-all.git] / website / site-sync
1 cat <<HEAD > mirror.html
2 <html>
3 <head>
4 <title>website mirror instructions</title>
5 </head>
6 <h1>RRDtool Mirror Source</h1>
7 <p>Run the following commands once a day.</p>
8 <pre>
9 #!/bin/sh
10 cd /YOUR/MIRROR/TREE
11 wget --no-host-directories --timestamping --recursive --level=1 http://oss.oetiker.ch/rrdtool/mirror.html
12 </pre>
14 <p>Create a file called <b>hoster.html</b> like that:</p>
15 <pre>
16 &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
17     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
18 &lt;html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"&gt;
19 &lt;head&gt;
20 &lt;style type="text/css"&gt;
21 body {
22     margin: 0px;
23     padding: 0px;
24     background-color: #f0f0f0;
25     font-family: sans-serif;
26     font-size: 8px;
27 }
29 #hoster a {
30     color: black;
31     text-decoration: none;
32 }
33 &lt;/style&gt;
34 &lt;/head&gt;
35 &lt;body&gt;
36 &lt;div id="hoster"&gt;
37 mirror by &lt;a target="_top" href="http://YOUR.SITE"&gt;Company&lt;/a&gt;
38 &lt;/div&gt;
39 &lt;/body&gt;
40 &lt;/html&gt;
41 </pre>
43 HEAD
45 for xt in html png gif ico css htaccess js; do
46   find . -name "*.$xt" -not -name stat"*" -not -name "hoster*" -exec printf '<a href="{}">.</a>' \; >> mirror.html
47 done
48 echo "</body></html>"                                     >> mirror.html
50 rsync --copy-unsafe-links --verbose --times --delete --exclude pub --exclude='*~' --exclude=".svn" --exclude=".condor" -r . oposs@oss.oetiker.ch:public_html/rrdtool/
51 #rsync --copy-unsafe-links --verbose --times --delete --exclude pub --exclude='*~' --exclude=".svn" --exclude=".condor" -r . /home/oetiker/public_html/webtools/rrdtool
52 #rsync --links --verbose --times --delete --exclude pub --exclude='*~' --rsh=ssh -r . tobi@ipn.caida.org:/ipn/web/Tools/RRDtool