-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·62 lines (52 loc) · 1.07 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/bash
set -euo pipefail
usage() {
cat >&2 <<END
USAGE: $(basename "$0") [-v] [--ffi|--jni]
Reproducibly builds the cross-compiled artifacts for the Juicebox SDK.
OPTIONS:
-v, --verbose verbose build
--ffi build the ffi artifacts
--jni build the jni artifacts
-h, --help show this help information
END
}
VERBOSE=
FFI=
JNI=
while [ "${1:-}" != "" ]; do
case $1 in
-v | --verbose )
VERBOSE=1
;;
--ffi )
FFI=1
JNI=${JNI:-0}
;;
--jni )
JNI=1
FFI=${FFI:-0}
;;
-h | --help )
usage
exit
;;
* )
usage
exit 2
esac
shift
done
# cd to repo root directory
cd -P -- "$(dirname -- "$0")/.."
docker pull juiceboxsystems/juicebox-sdk-artifacts
docker run --rm \
--platform=linux/amd64 \
-v "$PWD:/sdk:ro" \
-v "$PWD/artifacts:/sdk/artifacts:rw" \
-w /sdk \
-e FFI=${FFI} \
-e JNI=${JNI} \
-e VERBOSE=${VERBOSE} \
juiceboxsystems/juicebox-sdk-artifacts:latest \
/sdk/artifacts/build_inner.sh