forked from twitter/finagle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sbt
executable file
·31 lines (24 loc) · 870 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
#!/bin/bash
set -eo pipefail
sbtver="1.7.1"
sbtjar="sbt-launch-$sbtver.jar"
sbtsha128="468efdd45baf58dbb575f9b4369c5234f8cd54ba"
sbtrepo="https://repo1.maven.org/maven2/org/scala-sbt/sbt-launch"
if [ ! -f "sbt-launch.jar" ]; then
echo "downloading $PWD/$sbtjar" 1>&2
if ! curl --location --silent --fail -o "sbt-launch.jar" "$sbtrepo/$sbtver/$sbtjar"; then
exit 1
fi
fi
checksum=`openssl dgst -sha1 sbt-launch.jar | awk '{ print $2 }'`
if [ "$checksum" != $sbtsha128 ]; then
echo "bad $PWD/sbt-launch.jar. delete $PWD/sbt-launch.jar and run $0 again."
exit 1
fi
[ -f ~/.sbtconfig ] && . ~/.sbtconfig
# the -DSKIP_SBT flag is set to skip tests that shouldn't be run with sbt.
java -ea \
$SBT_OPTS \
$JAVA_OPTS \
-DSKIP_SBT=1 \
-jar "sbt-launch.jar" "$@"