#!/bin/sh UPDATE_SITE=http://download.eclipse.org/technology/babel/update-site/ganymede/ ECLIPSE_BIN=eclipse CURL='curl -H Pragma: --remote-time --fail --show-error' DEST=eclipse mkdir -p $DEST home #$CURL $UPDATE_SITE -o site.xml #cat site.xml | grep 'id="org.eclipse.nls.' | sed 's/.*id="org.eclipse.nls.\([a-zA-Z_]*\)".*/\1/g' | sort -u >locales.txt #locales = (backquote)cat locales.txt(backquote); do locales='ar bg cs da de el es fi fr hu it he ja ko nl no pl pt pt_BR ro ru sv tr uk zh zh_TW' #es_CA hi tl en echo Locales to be fetched: echo $locales for locale in $locales; do # deal with locale id changes - see http://java.sun.com/javase/6/docs/api/java/util/Locale.html#Locale(java.lang.String) if [ $locale == he ] ; then javalocale=iw elif [ $locale == yi ] ; then javalocale=ji elif [ $locale == id ] ; then javalocale=in else javalocale=$locale fi workdir=eclipse-nls/$locale mkdir -p $workdir echo "Downloading all translations for locale \"$locale\". This might take a few minutes..." profile=${locale}-Profile # work around the fact that p2 doesn't seem to # support updates from command-line: rm -fr $DEST/p2/org.eclipse.equinox.p2.engine/profileRegistry/$profile.profile time $ECLIPSE_BIN \ --launcher.suppressErrors \ -nosplash \ -consoleLog \ -application org.eclipse.equinox.p2.director.app.application \ -metadataRepository $UPDATE_SITE \ -artifactRepository $UPDATE_SITE \ -installIU org.eclipse.nls.$javalocale.feature.group \ -destination $DEST \ -profile $profile \ -profileProperties org.eclipse.update.install.features=true \ -bundlepool $workdir \ -p2.os linux \ -p2.ws gtk \ -p2.arch x86 \ -roaming \ -vmargs \ -Duser.home=home \ -Declipse.p2.data.area=$DEST/p2 echo "Downloaded \"$locale\". Disk space used:" du -sh eclipse-nls/$locale done exit