Skip to content

Commit

Permalink
fix: add bookworm support
Browse files Browse the repository at this point in the history
  • Loading branch information
mryel00 committed Oct 30, 2023
1 parent ae2bc21 commit 1ae76b0
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fi
# Camera-streamer repo
CSTREAMER_PATH="camera-streamer"
if [[ -z "${CROWSNEST_CAMERA_STREAMER_REPO_SHIP}" ]]; then
CROWSNEST_CAMERA_STREAMER_REPO_SHIP="https://github.com/ayufan-research/camera-streamer.git"
CROWSNEST_CAMERA_STREAMER_REPO_SHIP="https://github.com/ayufan/camera-streamer.git"
fi
if [[ -z "${CROWSNEST_CAMERA_STREAMER_REPO_BRANCH}" ]]; then
CROWSNEST_CAMERA_STREAMER_REPO_BRANCH="master"
Expand Down
2 changes: 1 addition & 1 deletion tools/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ CN_CONFIG_ENVPATH="${CN_CONFIG_ROOTPATH}/systemd"
CN_MOONRAKER_CONFIG_PATH="${CN_CONFIG_CONFIGPATH}/moonraker.conf"
CN_USTREAMER_REPO="https://github.com/pikvm/ustreamer.git"
CN_USTREAMER_BRANCH="master"
CN_CAMERA_STREAMER_REPO="https://github.com/ayufan-research/camera-streamer.git"
CN_CAMERA_STREAMER_REPO="https://github.com/ayufan/camera-streamer.git"
CN_CAMERA_STREAMER_BRANCH="master"

### Messages
Expand Down
6 changes: 6 additions & 0 deletions tools/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,12 @@ main() {

add_group_video

if [[ "$(is_bookworm)" = "1" ]]; then
msg "Bookworm detected!"
msg "Using main branch of camera-streamer for Bookworm..."
CROWSNEST_CAMERA_STREAMER_REPO_BRANCH="${CROWSNEST_CAMERA_STREAMER_REPO_BRANCH_BOOKWORM}"
fi

build_apps

if [[ "${CROWSNEST_UNATTENDED}" = "0" ]]; then
Expand Down
1 change: 1 addition & 0 deletions tools/libs/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import_config() {
[[ -n "${CROWSNEST_USTREAMER_REPO_BRANCH}" ]] || CROWSNEST_USTREAMER_REPO_BRANCH="master"
[[ -n "${CROWSNEST_CAMERA_STREAMER_REPO_SHIP}" ]] || CROWSNEST_CAMERA_STREAMER_REPO_SHIP="https://github.com/ayufan/camera-streamer.git"
[[ -n "${CROWSNEST_CAMERA_STREAMER_REPO_BRANCH}" ]] || CROWSNEST_CAMERA_STREAMER_REPO_BRANCH="master"
[[ -n "${CROWSNEST_CAMERA_STREAMER_REPO_BRANCH_BOOKWORM}" ]] || CROWSNEST_CAMERA_STREAMER_REPO_BRANCH_BOOKWORM="main"
status_msg "Using default configuration ..." "0"
fi
}
6 changes: 6 additions & 0 deletions tools/libs/core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ is_buster() {
fi
}

is_bookworm() {
if [[ -f /etc/os-release ]]; then
grep -cq "bookworm" /etc/os-release &> /dev/null && echo "1" || echo "0"
fi
}

is_raspbian() {
if [[ -f /boot/config.txt ]] && [[ -f /etc/rpi-issue ]]; then
echo "1"
Expand Down

0 comments on commit 1ae76b0

Please sign in to comment.