# HG changeset patch # User Pascal Bellard # Date 1291732742 -3600 # Node ID b41ed6ae8b6b23f4bc661f72b17a67f8f75a80ea # Parent efb6fe9257f8f98fe5486029533353790dd642ba get-OpenOffice3: try a mirror list diff -r efb6fe9257f8 -r b41ed6ae8b6b get-OpenOffice3/stuff/get-OpenOffice3 --- a/get-OpenOffice3/stuff/get-OpenOffice3 Tue Dec 07 07:33:35 2010 +0000 +++ b/get-OpenOffice3/stuff/get-OpenOffice3 Tue Dec 07 15:39:02 2010 +0100 @@ -10,22 +10,35 @@ ROOT="$1" PATTERN="Linux_x86_install-rpm" +for MIRROR in \ +http://mirror.switch.ch/ftp/mirror/OpenOffice \ +http://openoffice.cict.fr \ +http://wwwftp.ciril.fr/pub/openoffice \ +http://artfiles.org/openoffice.org \ +http://vesta.informatik.rwth-aachen.de/ftp/pub/mirror/OpenOffice \ +http://ftp.ntua.gr/pub/OpenOffice \ +http://ftp.iitm.ac.in/openoffice \ +http://www.ring.gr.jp/archives/misc/openoffice \ +http://ftp.nluug.nl/pub/office/openoffice \ + +do wget -O - $MIRROR/ 2> /dev/null | grep -q localized && break ; done + DIR="stable" -LOC=$(wget -O - http://openofficeorg.secsup.org/localized/ 2> /dev/null \ +LOC=$(wget -O - $MIRROR/localized/ 2> /dev/null \ | grep -E ">$LANG/|>${LANG/_/-}/|>${LANG%_*}/" | head -1 | sed 's/.*href=\"\(.*\)\/\".*/\1/') [ -n "$LOC" ] && DIR="localized/$LOC" -VERSION="$(basename $(wget -O - http://openofficeorg.secsup.org/$DIR/ \ +VERSION="$(basename $(wget -O - $MIRROR/$DIR/ \ 2> /dev/null | grep href=\"[0-9] | tail -1 | sed 's/.*href=\"\(.*\)\".*/\1/'))" if [ -z "$VERSION" ]; then echo "Can't find VERSION. Abort." exit 0 fi echo "Selecting $DIR version $VERSION ..." -TARBALL="$(wget -O - http://openofficeorg.secsup.org/$DIR/$VERSION/ \ +TARBALL="$(wget -O - $MIRROR/$DIR/$VERSION/ \ 2> /dev/null | grep $PATTERN | tail -1 | sed 's/.*href=\"\(.*\)\".*/\1/')" echo "Archive is $TARBALL ..." -WGET_URL=ftp://ftp.proxad.net/mirrors/ftp.openoffice.org/$DIR/$VERSION/$TARBALL +WGET_URL=$MIRROR/$DIR/$VERSION/$TARBALL TEMP_DIR="/tmp/$PACKAGE.$$" SOURCE_DIR="/tmp/src.$$"