File tree 1 file changed +9
-9
lines changed
1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export GCC_ARM_VER=${GCC_ARM_VER:="10.3-2021.10"}
20
20
export NRF_SDK_VER=${NRF_SDK_VER:= " nRF5_SDK_15.3.0_59ac345" }
21
21
22
22
MACHINE=" $( uname -m) "
23
- [[ " $MACHINE " == " arm64" ] ] && MACHINE=" aarch64"
23
+ [ " $MACHINE " = " arm64" ] && MACHINE=" aarch64"
24
24
25
25
export GCC_ARM_PATH=" gcc-arm-none-eabi-$GCC_ARM_VER "
26
26
@@ -29,9 +29,9 @@ main() {
29
29
30
30
mkdir -p " $TOOLS_DIR "
31
31
32
- [[ ! -d " $TOOLS_DIR /$GCC_ARM_PATH " ] ] && GetGcc
33
- [[ ! -d " $TOOLS_DIR /$NRF_SDK_VER " ] ] && GetNrfSdk
34
- [[ ! -d " $TOOLS_DIR /mcuboot" ] ] && GetMcuBoot
32
+ [ ! -d " $TOOLS_DIR /$GCC_ARM_PATH " ] && GetGcc
33
+ [ ! -d " $TOOLS_DIR /$NRF_SDK_VER " ] && GetNrfSdk
34
+ [ ! -d " $TOOLS_DIR /mcuboot" ] && GetMcuBoot
35
35
36
36
mkdir -p " $BUILD_DIR "
37
37
@@ -73,13 +73,13 @@ CmakeGenerate() {
73
73
74
74
CmakeBuild () {
75
75
local target=" $1 "
76
- [[ -n " $target " ] ] && target=" --target $target "
77
- if cmake --build " $BUILD_DIR " --config $BUILD_TYPE $target -- -j$( nproc)
78
- then return 0 ; else return 1 ;
79
- fi
76
+ [ -n " $target " ] && target=" --target $target "
77
+ cmake --build " $BUILD_DIR " --config $BUILD_TYPE $target -- -j$( nproc)
78
+ BUILD_RESULT= $?
79
+ return $BUILD_RESULT
80
80
}
81
81
82
- if [[ $SOURCED == " false" ] ]; then
82
+ if [ $SOURCED = " false" ]; then
83
83
# It is important to return exit code of main
84
84
# To be future-proof, this is handled explicitely
85
85
main " $@ "
You can’t perform that action at this time.
0 commit comments