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}" \