Ganymede/Build/Archived Update Site

From Eclipsepedia

< Ganymede‎ | Build
Revision as of 16:16, 25 February 2008 by (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The script below can be used to create an Archived Update Site which mostly contains packed plugins. As of Ganymede M5, such an archive was 287MB. This archive can then be used as an offline Ganymede M5 update site installer, for fresh installs or to update an existing configuration. See also How can I run the update manager from a command line?

{codeblock| #!/bin/sh # # Mirror Ganymede. See # # curdir=`pwd` cd `dirname $0` mydir=`pwd` cd "${curdir}" mkdir ganymede mkdir ganymede.jars export PATH=/opt/JDKs/i386/jdk1.5.0_14/bin:$PATH which java ECLIPSE=/opt/eclipse-3.4m5-gtk/eclipse LAUNCHER=`ls $ECLIPSE/plugins/org.eclipse.equinox.launcher_*.jar | sort | tail -1` java -jar $LAUNCHER \ -application org.eclipse.update.core.standaloneUpdate \ -command mirror \ -from \ -to "${curdir}/ganymede" \ -mirrorURL \ -ignoreMissingPlugins true echo "---> Total size (JARs only)" du -k ganymede #workaround to downgrade pack200 effort to -E4 # See java -Dorg.eclipse.update.jarprocessor.pack200=$mydir \ -jar $LAUNCHER -application org.eclipse.update.core.siteOptimizer \ -jarProcessor -outputDir "${curdir}/ganymede" -processAll -pack "${curdir}/ganymede" java -jar $LAUNCHER -application org.eclipse.update.core.siteOptimizer \ -digestBuilder -digestOutputDir="${curdir}/ganymede" -siteXML="${curdir}/ganymede/site.xml" echo "---> Total size (JARs and .pack.gz)" du -k ganymede mkdir ganymede.jars/features mkdir ganymede.jars/plugins #features need to remain in unpacked form for UM to use #mv ganymede/features/*.jar ganymede.jars/features mv ganymede/plugins/*.jar ganymede.jars/plugins #revert to .jar instead of .jar.pack.gz for selected plugins for x in org.eclipse.ocl.doc org.eclipse.rap.ui.intro org.eclipse.uml2.doc ; do rm ganymede/plugins/${x}*.jar.pack.gz mv ganymede.jars/plugins/${x}*.jar ganymede/plugins/ done sed -e 's,<site>,<site pack200="true">,g' "${curdir}/ganymede/site.xml" > xx mv -f xx "${curdir}/ganymede/site.xml" echo "---> Total size (.pack.gz only except 4 plugins)" du -k ganymede cd ganymede DATE=`date +'%Y%m%d'` zip -r ../ganymede_${DATE}.zip . cd .. }}