fix: fix empty string if ustreamer not found (#253)
Signed-off-by: Patrick Gehrsitz <mryel00.github@gmail.com>
This commit is contained in:
parent
a9db8f9ebe
commit
7f8536696f
13
libs/core.sh
13
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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user