File tree 1 file changed +29
-12
lines changed
1 file changed +29
-12
lines changed Original file line number Diff line number Diff line change 7
7
8
8
set -euxo pipefail
9
9
10
- if [ $# == 1 ]; then
11
- if [[ $1 == " --only-download" ]]; then
12
- DO_BUILD=false
13
- else
14
- echo " Unexpected optional argument, only '--only-download' is supported"
15
- exit 1
16
- fi
17
- else
18
- DO_BUILD=true
19
- fi
10
+ DEPS_CONFIGURE_UFID=" opt_64_cpp17"
11
+ DEPS_SKIP_BUILD=0
12
+
13
+ usage ()
14
+ {
15
+ echo " usage: ./build_deps.sh [--only-download] [--ufid <code>]"
16
+ echo " where: "
17
+ echo " --only-download Only download and configure dependencies, skip build"
18
+ echo " --ufid <code> The unified flag identifiers for the build system [${DEPS_CONFIGURE_UFID} ]"
19
+ exit 1
20
+ }
21
+
22
+ while true ; do
23
+ case " $1 " in
24
+ --help)
25
+ usage ;;
26
+ --ufid)
27
+ DEPS_CONFIGURE_UFID=$2 ; shift 2 ;;
28
+ --only-download)
29
+ DEPS_SKIP_BUILD=1 ; shift ;;
30
+ --* )
31
+ echo " Invalid option: ${1} "
32
+ usage ;;
33
+ * )
34
+ break ;;
35
+ esac
36
+ done
20
37
21
38
fetch_git () {
22
39
local org=$1
@@ -49,7 +66,7 @@ fetch_deps() {
49
66
configure () {
50
67
PATH=" $PATH :$( realpath srcs/bde-tools/bin) "
51
68
export PATH
52
- eval " $( bbs_build_env -u opt_64_cpp17 ) "
69
+ eval " $( bbs_build_env -u ${DEPS_CONFIGURE_UFID} ) "
53
70
}
54
71
55
72
build_bde () {
@@ -68,7 +85,7 @@ build_ntf() {
68
85
--without-usage-examples \
69
86
--without-applications \
70
87
--without-warnings-as-errors \
71
- --ufid opt_64_cpp17
88
+ --ufid ${DEPS_CONFIGURE_UFID}
72
89
make -j8
73
90
make install
74
91
popd
You can’t perform that action at this time.
0 commit comments