From 7f8536696f1868de47519cbd1d8d17f6725d82b6 Mon Sep 17 00:00:00 2001 From: Patrick Gehrsitz Date: Tue, 2 Apr 2024 19:25:49 +0200 Subject: [PATCH] fix: fix empty string if ustreamer not found (#253) Signed-off-by: Patrick Gehrsitz --- libs/core.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/libs/core.sh b/libs/core.sh index d37e2b73..59581de7 100755 --- a/libs/core.sh +++ b/libs/core.sh @@ -82,18 +82,15 @@ function check_dep { function check_apps { local cstreamer ustreamer - ustreamer_base="bin/ustreamer" - ustreamer="$(find "${BASE_CN_PATH}"/"${ustreamer_base}" \ - -iname 'ustreamer.bin' 2> /dev/null | sed '1q')" + ustreamer="bin/ustreamer/src/ustreamer.bin" cstreamer="bin/camera-streamer/camera-streamer" - - if [[ -x "${ustreamer}" ]]; then - log_msg "Dependency: '${ustreamer##*/}' found in ${ustreamer_base}/${ustreamer##*/}." - UST_BIN="${ustreamer}" + if [[ -x "${BASE_CN_PATH}/${ustreamer}" ]]; then + log_msg "Dependency: 'ustreamer' found in ${ustreamer}." + UST_BIN="${BASE_CN_PATH}/${ustreamer}" # shellcheck disable=SC2034 declare -r UST_BIN else - log_msg "Dependency: '${ustreamer##*/}' not found. Exiting!" + log_msg "Dependency: 'ustreamer' not found. Exiting!" exit 1 fi