fix: fix func detect_libcamera

If libcamera of arducam is used, we need to get rid of its output,
compared to raspi foundations libcamera output

Signed-off-by: Stephan Wendel <me@stephanwe.de>
This commit is contained in:
Stephan Wendel 2023-05-02 18:51:40 +02:00
parent a07e42a1ac
commit 0c524b725d
No known key found for this signature in database
GPG Key ID: F465B83ACBA45639

View File

@ -63,7 +63,7 @@ detect_libcamera() {
local avail
if [[ "$(is_raspberry_pi)" = "1" ]] &&
[[ -x "$(command -v libcamera-hello)" ]]; then
avail="$(libcamera-hello --list-cameras | awk 'NR==1 {print $1}')"
avail="$(libcamera-hello --list-cameras | sed '/^\[.*\].*/d' | awk 'NR==1 {print $1}')"
if [[ "${avail}" = "Available" ]]; then
echo "1"
else