Browse Source

add docker_idf command

ugv_io
Alex Mikhalev 6 years ago
parent
commit
59ce6b826f
  1. 14
      build.sh

14
build.sh

@ -52,6 +52,19 @@ build_docker() {
/esp/uas-ugv/build.sh cmake "$targets" /esp/uas-ugv/build.sh cmake "$targets"
} }
docker_idf() {
mkdir -p "$BUILD_DIR"
command -v setfacl 1>/dev/null && setfacl -m default:u:$USER:rwx "$BUILD_DIR"
build_docker_container
get_docker_run_flags
echo_status "Running idf.py $*"
docker run \
--volume="$DIR:/esp/uas-ugv" \
"${DOCKER_RUN_FLAGS[@]}" \
"$TOOLCHAIN_IMAGE" \
'/bin/bash' -c "cd /esp/uas-ugv && \$IDF_PATH/tools/idf.py $*"
}
build_cmake() { build_cmake() {
mkdir -p "$BUILD_DIR" mkdir -p "$BUILD_DIR"
cd "$BUILD_DIR" cd "$BUILD_DIR"
@ -70,6 +83,7 @@ CMD="$1"; shift
case $CMD in case $CMD in
docker_container) build_docker_container ;; docker_container) build_docker_container ;;
docker) build_docker "$@" ;; docker) build_docker "$@" ;;
docker_idf) docker_idf "$@" ;;
cmake) build_cmake "$@" ;; cmake) build_cmake "$@" ;;
clean) build_clean ;; clean) build_clean ;;
*) echo "Usage: $0 <docker_container|docker|cmake>" ;; *) echo "Usage: $0 <docker_container|docker|cmake>" ;;

Loading…
Cancel
Save