-
Notifications
You must be signed in to change notification settings - Fork 10
/
sbt
executable file
·40 lines (34 loc) · 1.12 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
#!/bin/bash
sbtver=1.2.8
sbtjar=sbt-launch.jar
sbtsha128=073c169c6e1a47b8ae78a7a718b907424dedab30
sbtrepo="https://repo1.maven.org/maven2/org/scala-sbt/sbt-launch"
if [ ! -f $sbtjar ]; then
echo "downloading $PWD/$sbtjar" 1>&2
if ! curl --location --silent --fail --remote-name $sbtrepo/$sbtver/$sbtjar; then
exit 1
fi
fi
checksum=`openssl dgst -sha1 $sbtjar | awk '{ print $2 }'`
if [ "$checksum" != $sbtsha128 ]; then
echo "bad $PWD/$sbtjar. delete $PWD/$sbtjar 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 $sbtjar "$@"