forked from linkerd/linkerd-zipkin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sbt
executable file
·48 lines (40 loc) · 1.24 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
#!/bin/bash
set -e
sbtver=0.13.9
sbtjar=.sbt-launch.jar
sbtsha128=1de48c2c412fffc4336e4d7dee224927a96d5abc
sbtrepo=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch
validjar() {
checksum=`openssl dgst -sha1 $sbtjar | awk '{ print $2 }'`
[ "$checksum" = $sbtsha128 ]
}
if [ -f $sbtjar ] && ! validjar ; then
echo "bad $sbtjar" >&2
mv $sbtjar "${sbtjar}.invalid"
fi
if [ ! -f $sbtjar ]; then
echo "downloading $sbtjar" >&2
curl -L --silent --fail -o $sbtjar $sbtrepo/$sbtver/sbt-launch.jar
fi
if ! validjar ; then
echo "bad $sbtjar. delete $sbtjar and run $0 again." >&2
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 $sbtjar "$@"