| 10 |
wgetopt="-t 5 -q -N" |
wgetopt="-t 5 -q -N" |
| 11 |
|
|
| 12 |
umask 002 |
umask 002 |
| 13 |
|
set -e |
| 14 |
|
|
| 15 |
if [ -d "../incoming" ]; then |
if [ -d "../incoming" ]; then |
| 16 |
root=$PWD/.. |
root=$PWD/.. |
| 25 |
nice_wget() { |
nice_wget() { |
| 26 |
# $1: url |
# $1: url |
| 27 |
# $2: filename |
# $2: filename |
| 28 |
file=`basename $1` |
# For timestamping to work, copy to .new (not link, wget will not break |
| 29 |
if [ -e "$2" ]; then |
# the link) |
| 30 |
cp -a $2 $file |
cp -a $2 $2.new |
| 31 |
fi |
wget $wgetopt -O $2.new $1 || \ |
| 32 |
wget $wgetopt $1 |
echo "Downloading $1 failed, $2 is stale now" |
| 33 |
mv $file $2 |
mv $2.new $2 |
| 34 |
} |
} |
| 35 |
|
|
| 36 |
# Download all Sources.gz |
# Download all Sources.gz |
| 60 |
done |
done |
| 61 |
|
|
| 62 |
# Download update_excuses.html |
# Download update_excuses.html |
| 63 |
wget $wgetopt http://ftp-master.debian.org/testing/update_excuses.html.gz |
nice_wget http://ftp-master.debian.org/testing/update_excuses.html.gz \ |
| 64 |
|
update_excuses.html.gz |
| 65 |
|
|
| 66 |
# Download PTS subscription count |
# Download PTS subscription count |
| 67 |
wget $wgetopt http://master.debian.org/~hertzog/pts/count.txt |
nice_wget http://master.debian.org/~hertzog/pts/count.txt count.txt |
| 68 |
|
|
| 69 |
# Download bugs summary |
# Download bugs summary |
| 70 |
wget $wgetopt http://merkel.debian.org/~hertzog/pts/bugs.txt |
nice_wget http://merkel.debian.org/~hertzog/pts/bugs.txt bugs.txt |
| 71 |
wget $wgetopt http://merkel.debian.org/~hertzog/pts/sources |
nice_wget http://merkel.debian.org/~hertzog/pts/sources sources |
| 72 |
# Temporary measure because merkel is fucked |
# Temporary measure because merkel is fucked |
| 73 |
#wget $wgetopt -O bugs.txt http://www.wolffelaar.nl/~jeroen/pts.bugs.txt |
#wget $wgetopt -O bugs.txt http://www.wolffelaar.nl/~jeroen/pts.bugs.txt |
| 74 |
#cp /org/bugs.debian.org/etc/indices/sources ./ |
#cp /org/bugs.debian.org/etc/indices/sources ./ |
| 95 |
|
|
| 96 |
# Decompress all files |
# Decompress all files |
| 97 |
for file in *.gz; do |
for file in *.gz; do |
| 98 |
gzip -d -c $file > ${file%%.gz} |
gzip -d -c $file > ${file%%.gz}.new |
| 99 |
|
touch -r $file ${file%%.gz}.new |
| 100 |
|
mv ${file%%.gz}.new ${file%%.gz} |
| 101 |
done |
done |
| 102 |
|
|
| 103 |
|
# vim: ts=8 |