1 |
apollock |
4 |
#!/bin/sh |
2 |
|
|
|
3 |
|
|
# |
4 |
|
|
# Copyright (c) 2006 Andrew Pollock |
5 |
|
|
# Permission to modify, redestribute, use, abuse, heap scorn upon granted |
6 |
|
|
# under the GNU General Public Licence v2 |
7 |
|
|
# |
8 |
|
|
|
9 |
|
|
rsync -aqz rsync://rsync.planetmirror.com/debian/dists/unstable/main/source/Sources.gz /srv/andrew.net.au/changelogs |
10 |
|
|
|
11 |
|
|
RC=$? |
12 |
|
|
|
13 |
|
|
while [ $RC -ne 0 ] |
14 |
|
|
do |
15 |
|
|
echo "Return code from rsync was $RC, retrying in 5 minutes" |
16 |
|
|
sleep 300 |
17 |
|
|
rsync -aqz rsync://rsync.planetmirror.com/debian/dists/unstable/main/source/Sources.gz /srv/andrew.net.au/changelogs |
18 |
|
|
RC=$? |
19 |
|
|
done |
20 |
|
|
|
21 |
|
|
gunzip -c /srv/andrew.net.au/changelogs/Sources.gz > /srv/andrew.net.au/changelogs/Sources.new |
22 |
|
|
mv /srv/andrew.net.au/changelogs/Sources.new /srv/andrew.net.au/changelogs/Sources |