pico-uart-bridge/build.sh
Álvaro Fernández Rojas 71faf3097a build.sh: improve script
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2022-05-03 19:40:03 +02:00

18 lines
306 B
Bash
Executable file

#!/bin/bash
BASE_DIR="$(dirname ${BASH_SOURCE[0]})"
BUILD_DIR=$BASE_DIR/build
PICO_SDK_DIR=$BASE_DIR/pico-sdk
main() {
if [ ! -d "$PICO_SDK_DIR/.git" ]; then
git submodule sync --recursive
git submodule update --init --recursive
fi
cmake -B $BUILD_DIR -S $BASE_DIR
make -C $BUILD_DIR
}
main $@