6 Usage syntax: ./build.sh <TARGET>
9 * You can specify multiple targets.
10 ./build.sh <TARGET_1> <TARGET_2> <TARGET_N>
11 * To get a list of all targets use \"help\". Hint: pipe the output through a pager.
12 ./build.sh help | less
13 * To build all targets use \"all\"
15 * To clean a target prefix it with \"clean_\".
16 ./build.sh clean_MATEKF405SE
17 * To clean all targets just use \"clean\".
22 if [ -z "$(docker images -q inav-build)" ]; then
23 echo -e "*** Building image\n"
24 docker build
-t inav-build .
28 if [ ! -d .
/build
]; then
29 echo -e "*** Creating build directory\n"
33 echo -e "*** Building targets [$@]\n"
34 docker run
--rm -it -v "$(pwd)":/src inav-build $@
36 if ls .
/build
/*.hex
&> /dev
/null
; then
37 echo -e "\n*** Built targets in ./build:"
38 stat
-c "%n (%.19y)" .
/build
/*.hex