mirror of https://github.com/sbt/sbt.git
Show default sbt memory size: 1024m
This commit is contained in:
parent
67fec3812c
commit
bc8ed20787
|
|
@ -69,7 +69,7 @@ declare -r win_sbt_opts_file="${sbt_home}/conf/sbtconfig.txt"
|
|||
|
||||
usage() {
|
||||
cat <<EOM
|
||||
Usage: $script_name [options]
|
||||
Usage: `basename "$0"` [options]
|
||||
|
||||
-h | -help print this message
|
||||
-v | -verbose this runner is chattier
|
||||
|
|
@ -79,7 +79,7 @@ Usage: $script_name [options]
|
|||
-sbt-dir <path> path to global settings/plugins directory (default: ~/.sbt)
|
||||
-sbt-boot <path> path to shared boot directory (default: ~/.sbt/boot in 0.11 series)
|
||||
-ivy <path> path to local Ivy repository (default: ~/.ivy2)
|
||||
-mem <integer> set memory options (default: $sbt_mem, which is $(get_mem_opts $sbt_mem))
|
||||
-mem <integer> 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 <port> Turn on JVM debugging, open at the given port.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue