blob: 32bbe4a8ba824abac40e5838c496b8ff15f1fc22 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#! /bin/sh
#
# Tiny startup wrapper for the Eclipse 3.0.x series
#
# Copyright (c) 2004, Karl Trygve Kalleberg <karltk@gentoo.org>
# 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} $@
|