Bug#347749: eclipse-platform-common: allow documented -vmargs for /usr/bin/eclipse

2006-01-12 Thread Bastian Kleineidam
Package: eclipse-platform-common
Version: 3.1.1-8
Severity: normal
Tags: patch

Hi,

the current /usr/bin/eclipse script does not allow the -vmargs option.
The patch scans for -vmargs and appends the custom options for the native
eclipse binary.
This way, I can run eclipse -vmargs -Xmx512 for example.

Regards,
  Bastian

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (900, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-treasure2
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)
--- eclipse.orig2006-01-12 13:38:59.0 +0100
+++ eclipse 2006-01-12 13:44:17.0 +0100
@@ -7,6 +7,7 @@
 #unset JAVA_HOME; export JAVA_HOME
 
 CMDLINEARGS=
+VMARGS=
 
 # Make sure this directory exists.
 if [ ! -d ~/.eclipse ]; then
@@ -42,6 +43,13 @@
 shift
 JAVA_HOME=$1
 shift
+elif [ $1 = -vmargs ]; then
+shift
+# -vmargs must be last argument, so use all remaining args
+while [ $1 ]; do
+VMARGS=${VMARGS} $1
+shift
+done
 else
 CMDLINEARGS=${CMDLINEARGS} $1
 shift
@@ -106,6 +114,6 @@
 -vmargs -Djava.library.path=/usr/lib/jni \
 -Dgnu.gcj.precompiled.db.path=/var/lib/gcj-4.0/classmap.db \
 -Dgnu.gcj.runtime.VMClassLoader.library_control=never \
--Dosgi.locking=none
+-Dosgi.locking=none $VMARGS
 
 exit $?


Bug#347749: eclipse-platform-common: allow documented -vmargs for /usr/bin/eclipse

2006-01-12 Thread Stephan Michels
On 1/12/06, Bastian Kleineidam [EMAIL PROTECTED] wrote:
 the current /usr/bin/eclipse script does not allow the -vmargs option.
 The patch scans for -vmargs and appends the custom options for the native
 eclipse binary.
 This way, I can run eclipse -vmargs -Xmx512 for example.

Thank you for the patch, should be fix in 3.1.1-9.
I fixed also -install, maybe it can be useful in some situations.

Stephan Michels.