forked from bokeh/bokeh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sbt
executable file
·45 lines (35 loc) · 1013 Bytes
/
sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
function usage {
echo "Usage: `basename $0` [OPTION|COMMAND]... -- [JVM OPTION]..."
}
while getopts h OPT;
do
case "$OPT" in
h)
usage
exit 0
;;
\?)
usage
exit 1;
;;
esac
done
shift `expr $OPTIND - 1`
SEP=" -- "
OPTS=$@
SBT_OPTS="${OPTS%$SEP*}"
if [ "$SBT_OPTS" != "$OPTS" ]; then
JVM_OPTS="${OPTS#*$SEP}"
else
JVM_OPTS=""
fi
JVM_DEFAULTS="-Dfile.encoding=UTF-8 -Xss8M -Xmx2G -XX:MaxPermSize=1024M -XX:ReservedCodeCacheSize=64M -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled"
JVM_OPTS="$JVM_DEFAULTS $JVM_OPTS"
SBT_VERSION=$(cat project/build.properties | grep sbt.version | cut -d'=' -f2)
SBT_LAUNCHER="$(dirname $0)/project/sbt-launch-$SBT_VERSION.jar"
if [ ! -e "$SBT_LAUNCHER" ]; then
URL="http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/$SBT_VERSION/sbt-launch.jar"
curl -o $SBT_LAUNCHER $URL
fi
java $JVM_OPTS -jar $SBT_LAUNCHER $SBT_OPTS