(2011/05/19 11:09), Jean Christophe André wrote:

I've just added an archive of current version of virror debmirror's
scripts at the end of virror's home page.
Nice script

#!/bin/sh
[ -n "$1" ] && VERSION="$1" || VERSION="3.4.0"

Can we rewrite it in python?
It will be nice feature if the script can detect the late latest version of LibO and start downloading.

if expr match "${VERSION}" ".*beta" > /dev/null ; then
URL="http://download.documentfoundation.org/libreoffice/testing/${VERSION}/";
else
URL="http://download.documentfoundation.org/libreoffice/stable/${VERSION}/";
fi
1. you can you rsync as well.
   http://download.documentfoundation.org/mirroring.html
2. ftp is better than http in term of error checking
3. TDF won't happy as we are sucking it's main host with wget.
I recommend using some .de mirror, which is quite close the TDF hosting server.
   cf. http://comments.gmane.org/gmane.comp.documentfoundation.mirrors/226
4. Stable versions are also available at mirrors,
    while TDF is the only place where we can get beta versions.


cd /srv/mirror/libreoffice
wget --recursive --no-parent --timestamping \
    --force-directories --no-host-directories --cut-dirs=2 \
    --accept *_en-US.*,*_vi.*,*_fr.*,*_multi.* \
    --reject *-SDK_*,BrOffice*,mirrorlist \
    "${URL}" >& download-${VERSION}.log &&
gzip -v9 download-${VERSION}.log &&
exit 0
The problems with wget ares
1) We cannot checksum, i.e, you have to check manually if the files are successfully downloaded.
2)  In other words, rsync is more reliable than wget




_______________________________________________
POST RULES : http://wiki.hanoilug.org/hanoilug:mailing_list_guidelines
_______________________________________________
HanoiLUG mailing lists: http://lists.hanoilug.org/
HanoiLUG wiki: http://wiki.hanoilug.org/
HanoiLUG blog: http://blog.hanoilug.org/

Trả lời cho