Skip to content

Commit

Permalink
fix: fix ustreamer binary path for v5.52 changes
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Gehrsitz <mryel00.github@gmail.com>
  • Loading branch information
mryel00 committed Feb 28, 2024
1 parent 4caedfe commit 93f6cea
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions libs/core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,15 @@ function check_dep {

function check_apps {
local cstreamer ustreamer
ustreamer="bin/ustreamer/ustreamer"
ustreamer_base="bin/ustreamer"
ustreamer="$(find ${BASE_CN_PATH}/${ustreamer_base} \
-iname 'ustreamer.bin' 2> /dev/null | sed '1q')"
cstreamer="bin/camera-streamer/camera-streamer"

if [[ -x "${BASE_CN_PATH}/${ustreamer}" ]]; then
log_msg "Dependency: '${ustreamer##*/}' found in ${ustreamer}."
if [[ -x "${ustreamer}" ]]; then
log_msg "Dependency: '${ustreamer##*/}' found in ${ustreamer_base}/${ustreamer##*/}."
UST_BIN="${ustreamer}"
declare -r UST_BIN
else
log_msg "Dependency: '${ustreamer##*/}' not found. Exiting!"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion libs/ustreamer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ run_mjpg() {
run_ustreamer() {
local cam_sec ust_bin dev pt res fps cstm start_param
cam_sec="${1}"
ust_bin="${BASE_CN_PATH}/bin/ustreamer/ustreamer"
ust_bin="${UST_BIN}"
dev="$(get_param "cam ${cam_sec}" device)"
pt="$(get_param "cam ${cam_sec}" port)"
res="$(get_param "cam ${cam_sec}" resolution)"
Expand Down
2 changes: 1 addition & 1 deletion libs/versioncontrol.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ versioncontrol() {
local cur_ver avail_ver
pushd "${BASE_CN_PATH}"/bin/ustreamer &> /dev/null || exit 1
avail_ver="$(git describe --tags --always)"
cur_ver="v$("${PWD}"/ustreamer -v)"
cur_ver="v$("${UST_BIN}" -v)"
if [[ "${cur_ver}" == "${avail_ver}" ]]; then
vc_log_msg "ustreamer is up to date. (${cur_ver})"
fi
Expand Down

0 comments on commit 93f6cea

Please sign in to comment.