build: automatically checkout pico-sdk

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
This commit is contained in:
Álvaro Fernández Rojas 2021-02-06 11:14:31 +01:00
parent 3f9c9fadde
commit beb34da36d

View file

@ -1,14 +1,20 @@
#!/bin/sh #!/bin/sh
BUILD_DIR=build BUILD_DIR=build
PICO_SDK_DIR=pico-sdk
main () { main () {
local cur_dir=$PWD local cur_dir=$PWD
if [ ! -d "$PICO_SDK_DIR/.git" ]; then
git submodule update --init --recursive
fi
mkdir -p $BUILD_DIR mkdir -p $BUILD_DIR
cd $BUILD_DIR cd $BUILD_DIR
cmake .. cmake ../
make make
cd $cur_dir cd $cur_dir
} }