forked from makman07/curve
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
43 lines (35 loc) · 813 Bytes
/
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
#!/usr/bin/env bash
set -x
# Copyright (C) 2021 Jingli Chen (Wine93), NetEase Inc.
############################ GLOBAL VARIABLES
g_stor=""
g_list=0
g_depend=0
g_target=""
g_release=0
g_ci=0
g_build_rocksdb=0
g_build_opts=(
"--define=with_glog=true"
"--define=libunwind=true"
"--copt -DHAVE_ZLIB=1"
"--copt -DGFLAGS_NS=google"
"--copt -DUSE_BTHREAD_MUTEX"
)
g_os="debian11"
source "$(dirname "${BASH_SOURCE}")/docker_opts.sh"
main() {
source "util/basic.sh"
source "util/build_functions.sh"
get_options "$@"
get_version
sudo docker run \
--rm \
-w /curve \
-v $(pwd):/curve \
${g_docker_opts[@]} \
opencurvedocker/curve-base:build-$g_os \
bash util/build_in_image.sh "$@"
}
############################ MAIN()
main "$@"