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 {
|
function check_apps {
|
||||||
local cstreamer ustreamer
|
local cstreamer ustreamer
|
||||||
ustreamer_base="bin/ustreamer"
|
ustreamer="bin/ustreamer/src/ustreamer.bin"
|
||||||
ustreamer="$(find "${BASE_CN_PATH}"/"${ustreamer_base}" \
|
|
||||||
-iname 'ustreamer.bin' 2> /dev/null | sed '1q')"
|
|
||||||
cstreamer="bin/camera-streamer/camera-streamer"
|
cstreamer="bin/camera-streamer/camera-streamer"
|
||||||
|
if [[ -x "${BASE_CN_PATH}/${ustreamer}" ]]; then
|
||||||
if [[ -x "${ustreamer}" ]]; then
|
log_msg "Dependency: 'ustreamer' found in ${ustreamer}."
|
||||||
log_msg "Dependency: '${ustreamer##*/}' found in ${ustreamer_base}/${ustreamer##*/}."
|
UST_BIN="${BASE_CN_PATH}/${ustreamer}"
|
||||||
UST_BIN="${ustreamer}"
|
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
declare -r UST_BIN
|
declare -r UST_BIN
|
||||||
else
|
else
|
||||||
log_msg "Dependency: '${ustreamer##*/}' not found. Exiting!"
|
log_msg "Dependency: 'ustreamer' not found. Exiting!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user