From 043f87a4d7ce3b697ad9948b6560bd654ae55b81 Mon Sep 17 00:00:00 2001 From: Patrick Gehrsitz <58853838+mryel00@users.noreply.github.com> Date: Tue, 28 Nov 2023 15:05:05 +0100 Subject: [PATCH] fix(build.sh): fix wrong cs branch for cloning Signed-off-by: Patrick Gehrsitz --- bin/build.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bin/build.sh b/bin/build.sh index b4ee2cc4..3e573952 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -73,6 +73,12 @@ is_raspberry_pi() { fi } +is_bookworm() { + if [[ -f /etc/os-release ]]; then + grep -cq "bookworm" /etc/os-release &> /dev/null && echo "1" || echo "0" + fi +} + ### Get avail mem get_avail_mem() { grep "MemTotal" /proc/meminfo | awk '{print $2}' @@ -116,6 +122,11 @@ clone_cstreamer() { printf "%s already exist ... [SKIPPED]\n" "${CSTREAMER_PATH}" return fi + if [[ "$(is_bookworm)" = "1" ]] then + msg "\nBookworm detected!" + msg "Using main branch of camera-streamer for Bookworm ...\n" + CROWSNEST_CAMERA_STREAMER_REPO_BRANCH="main" + fi git clone "${CROWSNEST_CAMERA_STREAMER_REPO_SHIP}" \ -b "${CROWSNEST_CAMERA_STREAMER_REPO_BRANCH}" \ "${BASE_CN_BIN_PATH}"/"${CSTREAMER_PATH}" \