-
-
Save smarter/f06ffc4f7a30175abf4b954571a8895b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#SBT_OPTS="-Xms512M -Xmx4096M -XX:ReservedCodeCacheSize=1024M -XX:+CMSClassUnloadingEnabled" | |
#SBT_OPTS="-Xms512M -Xmx1536M -XX:+CMSClassUnloadingEnabled -XX:MaxInlineLevel=35" | |
SBT_OPTS="-Xms512M -Xmx6192M -XX:ReservedCodeCacheSize=1024M -XX:+CMSClassUnloadingEnabled -XX:MaxInlineLevel=35" | |
ARGS=() | |
while [ $# -ne 0 ]; do | |
case $1 in | |
-D*) | |
JAVA_OPTS="$JAVA_OPTS $1" | |
shift | |
;; | |
-J-*) | |
opt=${1#"-J"} | |
JAVA_OPTS="$JAVA_OPTS $opt" | |
shift | |
;; | |
*) | |
ARGS+=("$1") | |
shift | |
;; | |
esac | |
done | |
if [ -e "$JAVA_HOME" ]; then | |
PATH="$JAVA_HOME"/bin:"$PATH" | |
fi | |
exec java $SBT_OPTS $JAVA_OPTS -jar $HOME/bin/sbt-1.2.3/sbt/bin/sbt-launch.jar "${ARGS[@]}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment