forked from TheHive-Project/TheHive
-
Notifications
You must be signed in to change notification settings - Fork 1
/
sbt
executable file
·41 lines (34 loc) · 1.18 KB
/
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
#!/bin/bash
# From https://github.com/twitter/util
SBT_VER=1.1.6
SBT_JAR=sbt-launch.jar
SBT_SHA128=e3dfecc05d04a8b4bfdb43e5246f48ced1570a32
SBT_REPO="https://repo1.maven.org/maven2/org/scala-sbt/sbt-launch"
if [ ! -f ${SBT_JAR} ]; then
echo "downloading ${PWD}/${SBT_JAR}" 1>&2
curl --location --silent --fail --remote-name ${SBT_REPO}/${SBT_VER}/${SBT_JAR} || exit 1
fi
CHECKSUM=`openssl dgst -sha1 ${SBT_JAR} | awk '{ print $2 }'`
if [ "${CHECKSUM}" != ${SBT_SHA128} ]
then
echo "bad ${PWD}/${SBT_JAR}. delete ${PWD}/${SBT_JAR} and run $0 again."
exit 1
fi
[ -f ~/.sbtconfig ] && . ~/.sbtconfig
java -ea \
${SBT_OPTS} \
${JAVA_OPTS} \
-Djava.net.preferIPv4Stack=true \
-XX:+AggressiveOpts \
-XX:+UseParNewGC \
-XX:+UseConcMarkSweepGC \
-XX:+CMSParallelRemarkEnabled \
-XX:+CMSClassUnloadingEnabled \
-XX:ReservedCodeCacheSize=128m \
-XX:SurvivorRatio=128 \
-XX:MaxTenuringThreshold=0 \
-Xss8M \
-Xms512M \
-Xmx2G \
-server \
-jar ${SBT_JAR} "$@"