fix(build.sh): fix wrong cs branch for cloning (#215)

Signed-off-by: Patrick Gehrsitz <mryel00.github@gmail.com>
This commit is contained in:
Patrick Gehrsitz 2023-11-28 22:21:05 +01:00 committed by GitHub
parent 5efc8c4757
commit 43a1ee3bc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
printf "\nBookworm detected!\n"
printf "Using main branch of camera-streamer for Bookworm ...\n\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}" \