Skip to content

Commit

Permalink
fix(build.sh): fix wrong cs branch for cloning
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Gehrsitz <[email protected]>
  • Loading branch information
mryel00 committed Nov 28, 2023
1 parent 5efc8c4 commit 98568b5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions bin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}'
Expand Down Expand Up @@ -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}" \
Expand Down

0 comments on commit 98568b5

Please sign in to comment.