2022-05-03 17:39:29 +00:00
|
|
|
#!/bin/bash
|
2021-02-03 11:49:34 +00:00
|
|
|
|
2022-05-03 17:39:29 +00:00
|
|
|
BASE_DIR="$(dirname ${BASH_SOURCE[0]})"
|
|
|
|
BUILD_DIR=$BASE_DIR/build
|
|
|
|
PICO_SDK_DIR=$BASE_DIR/pico-sdk
|
2021-02-03 11:49:34 +00:00
|
|
|
|
2022-05-03 17:39:29 +00:00
|
|
|
main() {
|
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
|
|
|
|
|
2022-05-03 17:39:29 +00:00
|
|
|
cmake -B $BUILD_DIR -S $BASE_DIR
|
|
|
|
make -C $BUILD_DIR
|
2021-02-03 11:49:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
main $@
|