Created
March 28, 2011 16:30
-
-
Save ccopsey/890780 to your computer and use it in GitHub Desktop.
Eclipse UpdateSite Mirroring and Batch Install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function execute { | |
echo $@ | |
$@ | |
echo | |
} | |
arch="linux-gtk-x86_64" | |
date=`date +%Y%m%d` | |
eclipseRootDirectory="/home/chris/eclipse" | |
eclipseDistribution="eclipse-jee-helios-SR2-$arch" | |
eclipseBinDirectory="$eclipseRootDirectory/$eclipseDistribution-$date" | |
updatesiteDirectory="/home/chris/eclipse/updatesites" | |
pluginsDirectory="/home/chris/eclipse/plugins" | |
equinoxLauncher="$eclipseBinDirectory/plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar" | |
updateCmd="java -jar $equinoxLauncher -application org.eclipse.update.core.standaloneUpdate" | |
p2Cmd="java -jar $equinoxLauncher -application org.eclipse.equinox.p2.director" | |
umask 77 | |
rm -rf ~/workspace | |
rm -rf ~/.eclipse | |
rm -rf $eclipseRootDirectory/eclipse | |
rm -rf $eclipseBinDirectory | |
tar -zxf $eclipseDistribution.tar.gz -C $eclipseRootDirectory | |
mv $eclipseRootDirectory/eclipse $eclipseBinDirectory | |
# CDT | |
execute "$updateCmd -command install -featureId org.eclipse.cdt -version 7.0.1.201009241320 -from file:$updatesiteDirectory/cdt_helios" | |
execute "$updateCmd -command install -featureId org.eclipse.photran -version 6.0.6.201102161000 -from file:$updatesiteDirectory/ptp_helios" | |
# Egit | |
execute "$updateCmd -command install -featureId org.eclipse.jgit -version 0.11.3 -from file:$updatesiteDirectory/egit" | |
execute "$updateCmd -command install -featureId org.eclipse.egit -version 0.11.3 -from file:$updatesiteDirectory/egit" | |
# Texclipse | |
execute "$updateCmd -command install -featureId net.sourceforge.texlipse -version 1.4.1 -from file:$updatesiteDirectory/texlipse" | |
# Subversion | |
execute "$updateCmd -command install -featureId org.tmatesoft.svnkit -version 1.2.3.5521 -from file:$updatesiteDirectory/subclipse_1.4" | |
execute "$updateCmd -command install -featureId org.tigris.subversion.clientadapter.feature -version 1.5.3 -from file:$updatesiteDirectory/subclipse_1.4" | |
execute "$updateCmd -command install -featureId org.tigris.subversion.clientadapter.javahl.feature -version 1.5.7 -from file:$updatesiteDirectory/subclipse_1.4" | |
execute "$updateCmd -command install -featureId org.tigris.subversion.clientadapter.svnkit.feature -version 1.5.6.1 -from file:$updatesiteDirectory/subclipse_1.4" | |
execute "$updateCmd -command install -featureId org.tigris.subversion.subclipse -version 1.4.8 -from file:$updatesiteDirectory/subclipse_1.4" | |
execute "$updateCmd -command install -featureId org.tigris.subversion.subclipse.graph.feature -version 1.0.7 -from file:$updatesiteDirectory/subclipse_1.4" | |
execute "$updateCmd -command install -featureId com.google.gdt.eclipse.suite.e36.feature -version 1.4.2.v201012211742 -from file:$updatesiteDirectory/google_3.6" | |
execute "$updateCmd -command install -featureId com.google.appengine.eclipse.sdkbundle.e36.feature.1.4.0 -version 1.4.0.v201012021502 -from file:$updatesiteDirectory/google_3.6" | |
execute "$updateCmd -command install -featureId com.google.gwt.eclipse.sdkbundle.e36.feature.2.1.1 -version 2.1.1.v201012170127 -from file:$updatesiteDirectory/google_3.6" | |
# PyDev | |
execute "$updateCmd -command install -featureId org.python.pydev.feature -version 1.6.5.2011020317 -from file:$updatesiteDirectory/pydev" | |
# PHPEclipse | |
execute "$updateCmd -command install -featureId net.sourceforge.phpeclipse.feature -version 1.2.3.200910091456PRD -from file:$updatesiteDirectory/phpeclipse_1.2" | |
# SQLExplorer | |
execute "$updateCmd -command install -featureId net.sourceforge.sqlexplorer -version 3.6.1.v20110108_SR1 -from file:$updatesiteDirectory/eclipsesql" | |
execute "cp -R $pluginsDirectory/shelled_1_0_4/* $eclipseBinDirectory/dropins/" | |
cp install.sh $eclipseBinDirectory/ | |
echo "Done." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set PROXY= | |
REM set PROXY=-Dhttp.proxyHost=proxy-server -Dhttp.proxyPort=8080 | |
set ECLIPSEINSTALL=%USERPROFILE%\Desktop\eclipse | |
set MIRRORURL=http://server/updatesites | |
set UPDATESITES=\\path\to\updatesites | |
CALL:UPDATEP2 http://download.eclipse.org/egit/updates egit | |
CALL:UPDATESITE http://download.eclipse.org/releases/helios helios | |
CALL:UPDATESITE http://download.eclipse.org/tools/cdt/releases/helios cdt_helios | |
CALL:UPDATESITE http://download.eclipse.org/tools/ptp/updates/helios ptp_helios | |
CALL:UPDATESITE http://texlipse.sourceforge.net texlipse | |
CALL:UPDATESITE http://subclipse.tigris.org/update_1.4.x subclipse_1.4 | |
CALL:UPDATESITE http://dl.google.com/eclipse/plugin/3.6 google_3.6 | |
CALL:UPDATESITE http://pydev.org/updates pydev | |
CALL:UPDATESITE http://update.phpeclipse.net/update/stable/1.2.x phpeclipse_1.2 | |
CALL:UPDATESITE http://eclipsesql.sourceforge.net/ eclipsesql | |
GOTO:EOF | |
:UPDATESITE | |
java %PROXY% -jar "%ECLIPSEINSTALL%\plugins\org.eclipse.equinox.launcher_1.1.0.v20100507.jar" -application org.eclipse.update.core.standaloneUpdate -command mirror -from %1 -mirrorUrl %MIRRORURL%/%2 -to %UPDATESITES%\%2 | |
GOTO:EOF | |
:UPDATEP2 | |
java -Dosgi.eclipse.ecf.provider.filetransfer.retrieve.readTimeout=3000 -Dosgi.eclipse.ecf.provider.filetransfer.retrieve.closeTimeout=3000 %PROXY% -jar "%ECLIPSEINSTALL%\plugins\org.eclipse.equinox.launcher_1.1.0.v20100507.jar" -application org.eclipse.equinox.p2.metadata.repository.mirrorApplication -source %1 -destination file:%UPDATESITES%\%2 | |
java -Dosgi.eclipse.ecf.provider.filetransfer.retrieve.readTimeout=3000 -Dosgi.eclipse.ecf.provider.filetransfer.retrieve.closeTimeout=3000 %PROXY% -jar "%ECLIPSEINSTALL%\plugins\org.eclipse.equinox.launcher_1.1.0.v20100507.jar" -application org.eclipse.equinox.p2.artifact.repository.mirrorApplication -source %1 -destination file:%UPDATESITES%\%2 | |
GOTO:EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment