forked from fbettag/lift-netty-integration
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsbt
executable file
·55 lines (44 loc) · 1.2 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
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/sh
root=$(
cd $(dirname $(readlink $0 || echo $0))/..
pwd
)
sbtver=0.12.2
sbtjar=sbt-launch.jar
sbtsum=d523ab71b5d2bcaead80d21d0af79361
function download() {
echo "downloading ${sbtjar}" 1>&2
curl -O "http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/${sbtver}/${sbtjar}"
}
function sbtjar_md5() {
openssl md5 < ${sbtjar} | cut -f2 -d'=' | awk '{print $1}'
}
if [ ! -f "${sbtjar}" ]; then
download
fi
test -f "${sbtjar}" || exit 1
jarmd5=$(sbtjar_md5)
if [ "${jarmd5}" != "${sbtsum}" ]; then
echo "Bad MD5 checksum on ${sbtjar}!" 1>&2
echo "Moving current sbt-launch.jar to sbt-launch.jar.old!" 1>&2
mv "${sbtjar}" "${sbtjar}.old"
download
jarmd5=$(sbtjar_md5)
if [ "${jarmd5}" != "${sbtsum}" ]; then
echo "Bad MD5 checksum *AGAIN*!" 1>&2
exit 1
fi
fi
test -f ~/.sbtconfig && . ~/.sbtconfig
java -ea -server $SBT_OPTS $JAVA_OPTS \
-XX:+AggressiveOpts \
-XX:+OptimizeStringConcat \
-XX:+UseConcMarkSweepGC \
-XX:+CMSParallelRemarkEnabled \
-XX:+CMSClassUnloadingEnabled \
-XX:+CMSIncrementalMode \
-Dio.netty.epollBugWorkaround=true \
-Xms128M \
-XX:MaxPermSize=512M \
-Xmx1G \
-jar $sbtjar "$@"