请问如何使用终端在Ubuntu 12.04上安装最新的
Eclipse Classic(4.2)?如果你能引导我一步一步,我将不胜感激.
请参阅这篇博客文章
here,了解分步说明.
@H_403_7@#!/bin/sh
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_indigo/enabled=true
repositories/http\:__download.eclipse.org_releases_indigo/isSystem=false
repositories/http\:__download.eclipse.org_releases_indigo/nickname=Indigo Update Site
repositories/http\:__download.eclipse.org_releases_indigo/uri=http\://download.eclipse.org/releases/indigo/
EOF
}
if [ ! -d ~/.eclipse/ ] ; then
$ECLIPSE -clean -initialize || exit $?
artifact=$(find ~/.eclipse \
-regex .*/profileRegistry/.*/org.eclipse.equinox.p2.artifact.repository.prefs)
Metadata=$(find ~/.eclipse \
-regex .*/profileRegistry/.*/org.eclipse.equinox.p2.Metadata.repository.prefs)
if [ -z "$artifact" ] || [ -z "$Metadata" ]; then
echo "W: Cannot inject update-sites,cannot find the correct config." 2>&1
else
( inject_update_site "$artifact" && \
inject_update_site "$Metadata" && \
echo "I: Injected update sites" ) || echo "W: Could not inject update sites." 2>&1
fi
fi
exec $ECLIPSE "$@"
哪个工作.