Jump to: navigation, search

Ganymede/Build/Archived Update Site

< Ganymede‎ | Build
Revision as of 16:18, 25 February 2008 by Codeslave.ca.ibm.com (Talk | contribs) (formatting)

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?

# Mirror Ganymede.
cd `dirname $0`
cd "${curdir}"

mkdir ganymede
mkdir ganymede.jars
export PATH=/opt/JDKs/i386/jdk1.5.0_14/bin:$PATH
which java
LAUNCHER=`ls $ECLIPSE/plugins/org.eclipse.equinox.launcher_*.jar | sort | tail -1`
java -jar $LAUNCHER \
    -application org.eclipse.update.core.standaloneUpdate \
    -command mirror \
    -from http://download.eclipse.org/releases/ganymede/staging \
    -to "${curdir}/ganymede" \
    -mirrorURL http://dsdp.eclipse.org/releases/ganymede \
    -ignoreMissingPlugins true
echo "---> Total size (JARs only)"
du -k ganymede
#workaround to downgrade pack200 effort to -E4
# See https://bugs.eclipse.org/bugs/show_bug.cgi?id=154069
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 com.ibm.icu 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/
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 ..