#!/bin/sh
#
# $OpenBSD: patch-eclipse_in,v 1.5 2006/08/01 20:07:30 kurt Exp $
#
# OpenBSD-specific startup script for Eclipse Platform
#

ECLIPSE_HOME=/usr/local/eclipse
export MOZILLA_FIVE_HOME=/usr/local/xulrunner
export LD_LIBRARY_PATH=$MOZILLA_FIVE_HOME:$LD_LIBRARY_PATH


#-----------------------------------------------------------------------------
# Determine configuration settings
#-----------------------------------------------------------------------------

JAVACMD=$(javaPathHelper -c eclipse-sdk)

if [ -z "${JAVACMD}" ]; then
	exit 1
fi

# Check if 'eclipse' executable can be found
if [ ! -x "${ECLIPSE_HOME}/eclipse" ]; then
	echo "Error: ECLIPSE_HOME is not defined correctly: ${ECLIPSE_HOME}"
	echo "       Unable to find eclipse launcher binary"
	exit 1
fi

exec "${ECLIPSE_HOME}/eclipse" -vm ${JAVACMD} $@
