Skip to content

Commit

Permalink
Switch from JAVA_OPTS to JVM_OPTS. The former retained as an alias fo…
Browse files Browse the repository at this point in the history
…r now.
  • Loading branch information
technomancy committed Dec 25, 2010
1 parent 3f299cc commit 65a2dc4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
5 changes: 5 additions & 0 deletions NEWS
@@ -1,5 +1,10 @@
Leiningen NEWS -- history of user-visible changes

= 1.4.2 / ???

* Use JVM_OPTS environment variable instead of JAVA_OPTS, though the latter
is still supported for backwards-compatibility.

= 1.4.1 / 2010-12-16

* Allow boosting :repl-retry-limit in project.clj for slow-starting projects.
Expand Down
5 changes: 4 additions & 1 deletion bin/lein
Expand Up @@ -87,6 +87,9 @@ fi

JAVA_CMD=${JAVA_CMD:-"java"}

# Support $JAVA_OPTS for backwards-compatibility.
JVM_OPTS=${JVM_OPTS:-$JAVA_OPTS}

# If you're packaging this for a package manager (.deb, homebrew, etc)
# you need to remove the self-install and upgrade functionality.
if [ "$1" = "self-install" ]; then
Expand Down Expand Up @@ -164,7 +167,7 @@ else
# slower JVM boot.
# TODO: add more to the boot classpath
test $CYGWIN_JLINE && stty -icanon min 1 -echo
exec $RLWRAP $JAVA_CMD -Xbootclasspath/a:"$CLOJURE_JAR" -client $JAVA_OPTS \
exec $RLWRAP $JAVA_CMD -Xbootclasspath/a:"$CLOJURE_JAR" -client $JVM_OPTS \
-Dleiningen.original.pwd="$ORIGINAL_PWD" \
-cp "$CLASSPATH" $JLINE clojure.main -e "(use 'leiningen.core)(-main)" \
$NULL_DEVICE $@
Expand Down
5 changes: 4 additions & 1 deletion resources/script-template
@@ -1,12 +1,15 @@
#!/bin/sh

# This script was automatically generated by Leiningen.

CLASSPATH="%s"
NULL_DEVICE=/dev/null
JVM_OPTS=${JVM_OPTS:-$JAVA_OPTS}

if [ "$OSTYPE" = "cygwin" ]; then
CLASSPATH=`cygpath -wp "$CLASSPATH"`
NULL_DEVICE=NUL
fi

java -cp "$CLASSPATH" $JAVA_OPTS \
java -cp "$CLASSPATH" $JVM_OPTS \
clojure.main -e "(use '%s)(apply -main *command-line-args*)" $NULL_DEVICE "$@"

0 comments on commit 65a2dc4

Please sign in to comment.