#!/bin/bash
#This is used for re-retrieving the "template.pot files as htmls" and the pot files from dany's site

wgetOpts='--passive-ftp --dot-style=mega --continue -T 30 -e ftp_proxy=http://your.proxy.4ftp:port/ -e http_proxy=http://your.proxy.4http:port/ -Ulegalbrowser'
SERVICE=http\\\:\\\/\\\/
#------------------------------------------
if test -f /bin/mktemp
then
	TMPFILE=`mktemp`
else
	TMPFILE=`date +%d%m%y%k%M%S`
	touch $TMPFILE
fi


grep -A5 'Request diff between arbitrary revisions' `find . -name templates\.pot\*`| grep 'Revision' | sed s/A\>\ .*$/A\>/ | sed s/templates\.pot\@cvsroot\=d\-i\-\ Revision\ \<A\ HREF\=\"// | sed s/\"\>\<[bB]\>.*// | sed s/^\.\\\//"$SERVICE"/ | sed s/amp\;//g > $TMPFILE

#We should brag about the place we're at ...
wget -x -r -l1 $wgetOpts 'http://people.debian.org/~barbier/d-i/l10n/POT/'
wget -x $wgetOpts 'http://people.debian.org/~barbier/d-i/l10n/rank.txt'
#rm -f $TMPFILE
