-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·51 lines (38 loc) · 1.56 KB
/
setup.sh
File metadata and controls
executable file
·51 lines (38 loc) · 1.56 KB
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
#!/bin/bash
# Fail the whole script if any command fails
set -e
export JSR308=$(cd $(dirname "$0")/.. && pwd)
if [ "$(uname)" == "Darwin" ] ; then
export JAVA_HOME=${JAVA_HOME:-$(/usr/libexec/java_home)}
else
export JAVA_HOME=${JAVA_HOME:-$(dirname $(dirname $(readlink -f $(which javac))))}
fi
# Default value is opprop. REPO_SITE may be set to other value for travis test purpose.
export REPO_SITE="${REPO_SITE:-txiang61}"
echo "------ Downloading everything from REPO_SITE: $REPO_SITE ------"
# Build checker-framework
if [ -d $JSR308/checker-framework ] ; then
(cd $JSR308/checker-framework && git pull)
else
BRANCH=master
(cd $JSR308 && git clone -b $BRANCH --depth 1 https://github.com/"$REPO_SITE"/checker-framework.git)
fi
# Build checker-framework-inference
if [ -d $JSR308/checker-framework-inference ] ; then
(cd $JSR308/checker-framework-inference && git pull)
else
BRANCH=master
(cd $JSR308 && git clone -b $BRANCH --depth 1 https://github.com/"$REPO_SITE"/checker-framework-inference.git)
fi
# This also builds annotation-tools
(cd $JSR308/checker-framework && checker/bin-devel/build.sh downloadjdk)
(cd $JSR308/checker-framework-inference && ./gradlew assemble dist && ./gradlew testLibJar)
echo "Fetching DLJC"
if [ -d $JSR308/do-like-javac ] ; then
(cd $JSR308/do-like-javac && git pull)
else
BRANCH=master
(cd $JSR308 && git clone -b $BRANCH --depth 1 https://github.com/"$REPO_SITE"/do-like-javac.git)
fi
echo "Building value-inference without testing"
(cd $JSR308/value-inference && ./gradlew build -x test --console=plain)