From 1d05fa900ef77c6c8756296efa083ee3bdbe5400 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Mon, 7 Jul 2014 16:03:37 -0400 Subject: [PATCH] Bug 438782 - Add check in Standalone Debugger install script - add a check in the Stand-alone Debugger install script to catch the situation where the eclipse binary is not found in the expected directory relative to this script Change-Id: I9f179c80085e5a80a5f4d7fafe1636a7cec38021 Reviewed-on: https://git.eclipse.org/r/29568 Tested-by: Hudson CI Reviewed-by: Jeff Johnston Tested-by: Jeff Johnston --- .../scripts/install.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/debug/org.eclipse.cdt.debug.application/scripts/install.sh b/debug/org.eclipse.cdt.debug.application/scripts/install.sh index adb56c1059d..fdb7016ebd4 100755 --- a/debug/org.eclipse.cdt.debug.application/scripts/install.sh +++ b/debug/org.eclipse.cdt.debug.application/scripts/install.sh @@ -9,6 +9,25 @@ # Contributors: # Red Hat Inc. - initial API and implementation ############################################################################### +olddir=`pwd` +cd ../.. +PLUGINS_DIR=`pwd` +# Verify that the install script is being run from a plug-ins folder of a +# downloaded Eclipse and not in a local user .eclipse folder. +if [ ! -f ../eclipse ]; then +echo "$0: error: eclipse executable not found in expected location" +echo " " +echo "This can occur if you are running this script from your local .eclipse directory" +echo "which would mean you are running a shared instance of the Eclipse platform for" +echo "your distro and have installed the Stand-alone Debugger from an eclipse.org" +echo "download repo. Downloading the Stand-alone Debugger feature on top of a distro" +echo "version of Eclipse Debugger is not supported. If you are using a distro version" +echo "of the Eclipse platform, you should not use this script. Instead, install the" +echo "corresponding Eclipse CDT package for your distro (e.g. eclipse-cdt package)" +echo "which will install the Stand-alone Debugger for you." +exit 1 +fi +cd $olddir if [ ! -d $HOME/cdtdebugger ]; then mkdir -p $HOME/cdtdebugger fi