-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsbt
executable file
·38 lines (33 loc) · 926 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
#! /bin/bash
SBT_VER="0.11.3-2"
JAVA_OPTS="-Dfile.encoding=UTF8 -Xmx256M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256m"
SBT_ARGS=""
for ARG in "$@"
do
case "$ARG" in
--debug)
echo "Running in debug mode"
JAVA_OPTS="${JAVA_OPTS} -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
;;
--no-format)
echo "Disabling SBT Log Formatting"
JAVA_OPTS="-Dsbt.log.noformat=true ${JAVA_OPTS}"
;;
test)
JAVA_OPTS="${JAVA_OPTS} -Dtesting=yes"
SBT_ARGS="${SBT_ARGS} ${ARG}"
;;
--production)
echo "Setting Production Mode"
JAVA_OPTS="${JAVA_OPTS} -Drun.mode=production"
;;
*)
SBT_ARGS="${SBT_ARGS} ${ARG}"
;;
esac
done
if [ -z "${SBT_ARGS}" ] ; then
java ${JAVA_OPTS} -jar `dirname $0`/sbt-launch-${SBT_VER}.jar
else
java ${JAVA_OPTS} -jar `dirname $0`/sbt-launch-${SBT_VER}.jar "$SBT_ARGS"
fi