Skip to content

Commit 16054d6

Browse files
committed
Reworked into bash array to prevent issues when setting watchfaces :-)
1 parent 23412a3 commit 16054d6

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

docker/build.sh

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,9 @@ GetNrfSdk() {
7777
}
7878

7979
CmakeGenerate() {
80-
CMAKE_ARGS=''
81-
82-
if [ -n "$ENABLE_USERAPPS" ]
83-
then
84-
CMAKE_ARGS="-DENABLE_USERAPPS=$ENABLE_USERAPPS"
85-
fi
86-
87-
if [ -n "$ENABLE_WATCHFACES" ]
88-
then
89-
CMAKE_ARGS="${CMAKE_ARGS} -DENABLE_WATCHFACES=$ENABLE_WATCHFACES"
90-
fi
80+
CMAKE_ARGS=()
81+
[ -n "$ENABLE_USERAPPS" ] && CMAKE_ARGS+=("-DENABLE_USERAPPS=$ENABLE_USERAPPS")
82+
[ -n "$ENABLE_WATCHFACES" ] && CMAKE_ARGS+=("-DENABLE_WATCHFACES=$ENABLE_WATCHFACES")
9183

9284
cmake -G "Unix Makefiles" \
9385
-S "$SOURCES_DIR" \
@@ -97,7 +89,7 @@ CmakeGenerate() {
9789
-DNRF5_SDK_PATH="$TOOLS_DIR/$NRF_SDK_VER" \
9890
-DBUILD_DFU=1 \
9991
-DBUILD_RESOURCES=1 \
100-
$CMAKE_ARGS
92+
${CMAKE_ARGS[@]}
10193
}
10294

10395
CmakeBuild() {

0 commit comments

Comments
 (0)