summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/ant/templates/tool-unix.tmpl
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-02-16 21:22:10 +0000
committerPaul Phillips <paulp@improving.org>2010-02-16 21:22:10 +0000
commit80b0d241349f6463e814a8c1eca34f827ce24518 (patch)
tree28832eb3bc91c5f79e0b3a58947078eeaa1ba437 /src/compiler/scala/tools/ant/templates/tool-unix.tmpl
parenta6b2e34c55d1ee77d87bedb7d6ddac3b61f24947 (diff)
downloadscala-80b0d241349f6463e814a8c1eca34f827ce24518.tar.gz
scala-80b0d241349f6463e814a8c1eca34f827ce24518.tar.bz2
scala-80b0d241349f6463e814a8c1eca34f827ce24518.zip
Unix scripts pass -D options to the underlying ...
Unix scripts pass -D options to the underlying JVM invocation. Closes #1222. Review by community.
Diffstat (limited to 'src/compiler/scala/tools/ant/templates/tool-unix.tmpl')
-rw-r--r--src/compiler/scala/tools/ant/templates/tool-unix.tmpl15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/ant/templates/tool-unix.tmpl b/src/compiler/scala/tools/ant/templates/tool-unix.tmpl
index ac50e3de54..b87463f0b9 100644
--- a/src/compiler/scala/tools/ant/templates/tool-unix.tmpl
+++ b/src/compiler/scala/tools/ant/templates/tool-unix.tmpl
@@ -1,5 +1,5 @@
#!/bin/sh
-
+#
##############################################################################
# Copyright 2002-2010, LAMP/EPFL
#
@@ -63,6 +63,19 @@ fi
# Reminder: substitution ${JAVA_OPTS:=-Xmx256M -Xms16M} DO NOT work on Solaris
[ -n "$JAVA_OPTS" ] || JAVA_OPTS="@javaflags@"
+# break out -D options and add them to JAVA_OPTS as well so they reach the
+# underlying JVM in time to do some good.
+for i
+do
+ case "$i" in
+ -D*)
+ JAVA_OPTS="$JAVA_OPTS $i" ;;
+ *)
+ ;;
+ esac
+done
+
+
if [ -z "$JAVACMD" -a -n "$JAVA_HOME" -a -x "$JAVA_HOME/bin/java" ]; then
JAVACMD="$JAVA_HOME/bin/java"
fi