From 8c99417f3737bee27ac01156b51ba7d407f8d2cb Mon Sep 17 00:00:00 2001 From: Patrick Gehrsitz <58853838+mryel00@users.noreply.github.com> Date: Tue, 7 Nov 2023 15:27:38 +0100 Subject: [PATCH] chore: wip --- tools/install.sh | 6 +++++- tools/libs/core.sh | 13 ++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/tools/install.sh b/tools/install.sh index dfb49f72..4d399e06 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -60,7 +60,11 @@ main() { if [[ -z "${INSTALL_CS}" ]]; then msg "Doing some tests ...\n" - INSTALL_CS="$(shallow_cs_dependencies_check)" + if shallow_cs_dependencies_check; then + INSTALL_CS="1" + else + INSTALL_CS="0" + fi status_msg "Doing some tests ..." "0" fi diff --git a/tools/libs/core.sh b/tools/libs/core.sh index 9f208975..b7b49161 100755 --- a/tools/libs/core.sh +++ b/tools/libs/core.sh @@ -73,22 +73,21 @@ shallow_cs_dependencies_check() { if ! [[ $(test_load_module ${SHALLOW_CHECK_MODULESLIST}) ]]; then status_msg "Checking for required kernel module ..." "3" msg "Not all required kernel modules can be loaded ..." - echo 0 - return + return 1 fi status_msg "Checking for required kernel module ..." "0" msg "Checking for required packages ...\n" # Update the number below if you update SHALLOW_CHECK_PKGLIST SHALLOW_CHECK_PKGLIST="^(libavformat-dev|libavutil-dev|libavcodec-dev|libcamera-dev|libcamera-apps-lite)$" - if [[ $(apt-cache search --names-only "${SHALLOW_CHECK_PKGLIST}" &> /dev/null) -eq 5 ]]; then - status_msg "Checking for required packages ..." "0" - echo 1 - else + if ! [[ $(apt-cache search --names-only "${SHALLOW_CHECK_PKGLIST}" &> /dev/null) -eq 5 ]]; then status_msg "Checking for required packages ..." "3" msg "Not all required packages can be installed ..." - echo 0 + return 1 fi + status_msg "Checking for required packages ..." "0" + + return 0 } link_pkglist_rpi() {