#! /bin/sh # # Tiny startup wrapper for the Eclipse 3.0.x series # # Copyright (c) 2004, Karl Trygve Kalleberg # Copyright (c) 2004, Gentoo Foundation # # Licensed under the GNU General Public License, version 2 # if [ -f $HOME/.eclipserc ] ; then . $HOME/.eclipserc fi if [ -z "${ECLIPSE_HOME}" ] ; then ECLIPSE_HOME=/usr/lib/eclipse-3.1 fi if [ "${PREFERRED_FRONTEND}" == "gtk" ] && [ -x ${ECLIPSE_HOME}/eclipse-gtk ] ; then ECLIPSE_BIN=${ECLIPSE_HOME}/eclipse-gtk elif [ "${PREFERRED_FRONTEND}" == "motif" ] && [ -x ${ECLIPSE_HOME}/eclipse-motif ] ; then ECLIPSE_BIN=${ECLIPSE_HOME}/eclipse-motif else if [ -x ${ECLIPSE_HOME}/eclipse-gtk ] ; then ECLIPSE_BIN=${ECLIPSE_HOME}/eclipse-gtk elif [ -x ${ECLIPSE_HOME}/eclipse-motif ] ; then ECLIPSE_BIN=${ECLIPSE_HOME}/eclipse-motif fi fi if [ ! -x ${ECLIPSE_BIN} ] ; then echo "Failed to find executable '${ECLIPSE_BIN}'" > /dev/stderr exit -1 fi if [ $(whoami) == "root" ] ; then echo "!!! You are running Eclipse as root. Be advised that this will modify the contents of" echo "!!! /usr/lib/eclipse-3.1, and that such a modification may prevent you from safely" echo "!!! upgrading to later 3.1 revisions." echo echo "!!! To ensure correct behavior on your next upgrade, do:" echo "!!! 1) 'emerge unmerge \"=eclipse-sdk-3.1\"'" echo "!!! 2) 'rm -rf /usr/lib/eclipse-3.1'" echo "!!! 3) 'emerge eclipse-sdk'" fi ${ECLIPSE_BIN} $@