From bc8ed20787af6a24ef22354363e7e8dd57d528a0 Mon Sep 17 00:00:00 2001 From: Jimin Hsieh Date: Wed, 30 May 2018 22:46:28 +0800 Subject: [PATCH] Show default sbt memory size: 1024m --- src/universal/bin/sbt | 4 ++-- src/universal/bin/sbt-launch-lib.bash | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/universal/bin/sbt b/src/universal/bin/sbt index 9070dab7c..8b236bfa9 100755 --- a/src/universal/bin/sbt +++ b/src/universal/bin/sbt @@ -69,7 +69,7 @@ declare -r win_sbt_opts_file="${sbt_home}/conf/sbtconfig.txt" usage() { cat < path to global settings/plugins directory (default: ~/.sbt) -sbt-boot path to shared boot directory (default: ~/.sbt/boot in 0.11 series) -ivy path to local Ivy repository (default: ~/.ivy2) - -mem set memory options (default: $sbt_mem, which is $(get_mem_opts $sbt_mem)) + -mem set memory options (default: $sbt_default_mem, which is $(get_mem_opts)) -no-share use all local caches; no sharing -no-global uses global caches, but does not use global ~/.sbt directory. -jvm-debug Turn on JVM debugging, open at the given port. diff --git a/src/universal/bin/sbt-launch-lib.bash b/src/universal/bin/sbt-launch-lib.bash index 2a106a225..3be1f7e3d 100755 --- a/src/universal/bin/sbt-launch-lib.bash +++ b/src/universal/bin/sbt-launch-lib.bash @@ -13,6 +13,7 @@ declare -a sbt_commands declare java_cmd=java declare java_version declare init_sbt_version=_to_be_replaced +declare sbt_default_mem=1024 declare SCRIPT=$0 while [ -h "$SCRIPT" ] ; do @@ -101,7 +102,7 @@ get_mem_opts () { else # a ham-fisted attempt to move some memory settings in concert # so they need not be messed around with individually. - local mem=${1:-1024} + local mem=${1:-$sbt_default_mem} local codecache=$(( $mem / 8 )) (( $codecache > 128 )) || codecache=128 (( $codecache < 512 )) || codecache=512