-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sh
executable file
·33 lines (27 loc) · 1.53 KB
/
build.sh
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
#!/bin/bash
ROOT="$( cd "$(dirname "$0")"/.. ; pwd -P )"
# Required argument $1 is one of:
# formatter, interning, lock, nullness, regex, signature, nothing
# Fail the whole script if any command fails
set -e
## Build Checker Framework
(cd $ROOT && git clone --depth 1 https://github.com/typetools/checker-framework.git)
# This also builds annotation-tools and jsr308-langtools
(cd $ROOT/checker-framework/ && ./.travis-build-without-test.sh downloadjdk)
export CHECKERFRAMEWORK=$ROOT/checker-framework
## Obtain guava
(cd $ROOT && git clone --depth 1 https://github.com/typetools/guava.git)
if [[ "$1" == "lock" ]]; then
(cd $ROOT/guava/guava && mvn compile -P checkerframework-local -Dcheckerframework.checkers=org.checkerframework.checker.lock.LockChecker)
elif [[ "$1" == "nullness" ]]; then
(cd $ROOT/guava/guava && mvn compile -P checkerframework-local -Dcheckerframework.checkers=org.checkerframework.checker.nullness.NullnessChecker)
elif [[ "$1" == "misc" ]]; then
(cd $ROOT/guava/guava && mvn compile -P checkerframework-local -Dcheckerframework.checkers=org.checkerframework.checker.regex.RegexChecker,org.checkerframework.checker.interning.InterningChecker,org.checkerframework.checker.formatter.FormatterChecker,org.checkerframework.checker.signature.SignatureChecker)
elif [[ "$1" == "index" ]]; then
(cd $ROOT/guava/guava && mvn compile -P checkerframework-local -Dcheckerframework.checkers=org.checkerframework.checker.index.IndexChecker)
elif [[ "$1" == "nothing" ]]; then
true
else
echo "Bad argument '$1' to build.sh"
false
fi