openbsd-ports/devel/netbeans/patches/patch-netbeans_in
2007-01-12 16:29:51 +00:00

31 lines
968 B
Plaintext

$OpenBSD: patch-netbeans_in,v 1.1.1.1 2007/01/12 16:30:04 ian Exp $
--- netbeans.in.orig Mon Jan 8 16:01:29 2007
+++ netbeans.in Mon Jan 8 16:09:23 2007
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# $OpenBSD: patch-netbeans_in,v 1.1.1.1 2007/01/12 16:30:04 ian Exp $
+#
+# OpenBSD-specific startup script for NetBeans IDE
+
+NETBEANS_HOME=%%NETBEANS_HOME%%
+
+#-----------------------------------------------------------------------------
+# Determine configuration settings
+#-----------------------------------------------------------------------------
+
+JAVA_HOME=`javaPathHelper -h netbeans`
+
+if [ -z "${JAVA_HOME}" ]; then
+ exit 1
+fi
+
+# Check if 'netbeans' executable can be found
+if [ ! -x "${NETBEANS_HOME}/bin/netbeans" ]; then
+ echo "Error: NETBEANS_HOME is not defined correctly: ${NETBEANS_HOME}"
+ echo " Unable to find launcher binary"
+ exit 1
+fi
+
+PATH=${JAVA_HOME}/bin:$PATH exec "${NETBEANS_HOME}/bin/netbeans" --jdkhome ${JAVA_HOME} $@