I am using Ubuntu 11.04 and once installed Eclipse 3.5.2 via software center.
Now I plan to make an upgrade to 4.1, so I downloaded the *.tar.gz file from here. I replaced the contents in /usr/lib/eclipse and now it's time to modify the start-up script /usr/bin/eclipse, which I am not familiar with, such as the dependency and the setting, coded in the file. Can anyone tell me how to rewrite those parts? Thank you.
The script is as follows:
!/bin/sh
# work around for e#290395 / LP: #458703
# https://bugs.eclipse.org/bugs/show_bug.cgi?id=290395
# https://bugs.launchpad.net/bugs/458703
export GDK_NATIVE_WINDOWS=true
export MOZILLA_FIVE_HOME="/usr/lib/xulrunner-$(/usr/bin/xulrunner-1.9.2--gre-version)"
ECLIPSE=/usr/lib/eclipse/eclipse
inject_update_site(){
if [ ! -e "$1" ] ; then
echo "W: Cannot find $1" 2>&1
return 1
fi
cat - >>"$1" <<EOF
repositories/http\:__download.eclipse.org_releases_galileo/enabled=true
repositories/http\:__download.eclipse.org_releases_galileo/isSystem=false
repositories/http\:__download.eclipse.org_releases_galileo/nickname=Galileo
Update Site
repositories/http\:__download.eclipse.org_releases_galileo/uri=http\://download.eclipse.org/releases/galileo/
EOF
}
if [ ! -d ~/.eclipse/ ] ; then
$ECLIPSE -clean -initialize || exit $?
settings=`echo
~/.eclipse/org.eclipse.platform_*/p2/org.eclipse.equinox.p2.engine/profileRegistry/PlatformProfile.profile/.data/.settings/`
if [ ! -d "$settings" ] ; then
echo "W: Cannot inject update-sites, cannot find the correct config." 2>&1
else
( inject_update_site
"$settings/org.eclipse.equinox.p2.metadata.repository.prefs" && \
inject_update_site
"$settings/org.eclipse.equinox.p2.artifact.repository.prefs" && \
echo "I: Injected update sites" ) || echo "W: Could not inject updatesites." 2>&1
fi
fi
exec $ECLIPSE "$@"