2021-02-03 11:49:34 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
BUILD_DIR=build
|
2021-02-06 10:14:31 +00:00
|
|
|
PICO_SDK_DIR=pico-sdk
|
2021-02-03 11:49:34 +00:00
|
|
|
|
|
|
|
main () {
|
|
|
|
local cur_dir=$PWD
|
|
|
|
|
2021-02-06 10:14:31 +00:00
|
|
|
if [ ! -d "$PICO_SDK_DIR/.git" ]; then
|
2022-05-03 10:19:39 +00:00
|
|
|
git submodule sync --recursive
|
2021-02-06 10:14:31 +00:00
|
|
|
git submodule update --init --recursive
|
|
|
|
fi
|
|
|
|
|
2021-02-03 11:49:34 +00:00
|
|
|
mkdir -p $BUILD_DIR
|
|
|
|
cd $BUILD_DIR
|
2021-02-06 10:14:31 +00:00
|
|
|
cmake ../
|
2021-02-03 11:49:34 +00:00
|
|
|
make
|
2021-02-06 10:14:31 +00:00
|
|
|
|
2021-02-03 11:49:34 +00:00
|
|
|
cd $cur_dir
|
|
|
|
}
|
|
|
|
|
|
|
|
main $@
|