Commit d0c2ca5 1 parent 4caedfe commit d0c2ca5 Copy full SHA for d0c2ca5
File tree 3 files changed +11
-5
lines changed
3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -82,11 +82,16 @@ function check_dep {
82
82
83
83
function check_apps {
84
84
local cstreamer ustreamer
85
- ustreamer=" bin/ustreamer/ustreamer"
85
+ ustreamer_base=" bin/ustreamer"
86
+ ustreamer=" $( find " ${BASE_CN_PATH} " /" ${ustreamer_base} " \
87
+ -iname ' ustreamer.bin' 2> /dev/null | sed ' 1q' ) "
86
88
cstreamer=" bin/camera-streamer/camera-streamer"
87
89
88
- if [[ -x " ${BASE_CN_PATH} /${ustreamer} " ]]; then
89
- log_msg " Dependency: '${ustreamer##*/ } ' found in ${ustreamer} ."
90
+ if [[ -x " ${ustreamer} " ]]; then
91
+ log_msg " Dependency: '${ustreamer##*/ } ' found in ${ustreamer_base} /${ustreamer##*/ } ."
92
+ UST_BIN=" ${ustreamer} "
93
+ # shellcheck disable=SC2034
94
+ declare -r UST_BIN
90
95
else
91
96
log_msg " Dependency: '${ustreamer##*/ } ' not found. Exiting!"
92
97
exit 1
Original file line number Diff line number Diff line change @@ -31,7 +31,8 @@ run_mjpg() {
31
31
run_ustreamer () {
32
32
local cam_sec ust_bin dev pt res fps cstm start_param
33
33
cam_sec=" ${1} "
34
- ust_bin=" ${BASE_CN_PATH} /bin/ustreamer/ustreamer"
34
+ # shellcheck disable=SC2153
35
+ ust_bin=" ${UST_BIN} "
35
36
dev=" $( get_param " cam ${cam_sec} " device) "
36
37
pt=" $( get_param " cam ${cam_sec} " port) "
37
38
res=" $( get_param " cam ${cam_sec} " resolution) "
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ versioncontrol() {
28
28
local cur_ver avail_ver
29
29
pushd " ${BASE_CN_PATH} " /bin/ustreamer & > /dev/null || exit 1
30
30
avail_ver=" $( git describe --tags --always) "
31
- cur_ver=" v$( " ${PWD} " /ustreamer -v) "
31
+ cur_ver=" v$( ${UST_BIN} -v) "
32
32
if [[ " ${cur_ver} " == " ${avail_ver} " ]]; then
33
33
vc_log_msg " ustreamer is up to date. (${cur_ver} )"
34
34
fi
You can’t perform that action at this time.
0 commit comments