From ec3162b0ae9602d0a44fe9a51d6c957cda3434eb Mon Sep 17 00:00:00 2001 From: Joachim Date: Tue, 7 Apr 2020 22:51:08 +0200 Subject: [PATCH] parsing the cmake output to get the list of opencv modules compiled --- esp32/scripts/build_opencv_for_esp32.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/esp32/scripts/build_opencv_for_esp32.sh b/esp32/scripts/build_opencv_for_esp32.sh index e695b22..e1ffabd 100755 --- a/esp32/scripts/build_opencv_for_esp32.sh +++ b/esp32/scripts/build_opencv_for_esp32.sh @@ -51,9 +51,11 @@ rm -rf build/ && mkdir -p build/ && cd build echo "================================================================================" echo "Configuring with cmake ${CMAKE_ARGS} :" echo "================================================================================" -cmake $CMAKE_ARGS .. +# launch cmake with args and parse list of modules to be build in a variable +OPENCV_MODULES_LIST=`cmake $CMAKE_ARGS .. | tee /dev/tty | grep 'To be built' | cut -f2 -d ':' | xargs | tr ' ' ','` +echo $OPENCV_MODULES_LIST read -p "Don't forget to check the cmake summary! Continue ? [y/N]" prompt -if [ "${prompt}" != "y" ]; then +if [ "${prompt}" != "y" ] && [ "${prompt}" != "Y" ] && [ "${prompt}" != "yes" ]; then echo "aborted." exit 1 fi