Skip to content

Commit 98773e9

Browse files
authored
[Automated] Merged develop into target master
2 parents 9623b5f + d66be34 commit 98773e9

File tree

15 files changed

+102
-374
lines changed

15 files changed

+102
-374
lines changed

bin/build.sh

Lines changed: 4 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ if [[ -z "${CROWSNEST_USTREAMER_REPO_SHIP}" ]]; then
3535
CROWSNEST_USTREAMER_REPO_SHIP="https://github.com/pikvm/ustreamer.git"
3636
fi
3737
if [[ -z "${CROWSNEST_USTREAMER_REPO_BRANCH}" ]]; then
38-
CROWSNEST_USTREAMER_REPO_BRANCH="v6.31"
38+
CROWSNEST_USTREAMER_REPO_BRANCH="v6.36"
3939
fi
4040

4141
# Camera-streamer repo
@@ -65,47 +65,8 @@ show_help() {
6565
}
6666

6767
## Helper funcs
68-
### Check if device is Raspberry Pi
69-
is_raspberry_pi() {
70-
if [[ -f /proc/device-tree/model ]] &&
71-
grep -q "Raspberry" /proc/device-tree/model; then
72-
echo "1"
73-
else
74-
echo "0"
75-
fi
76-
}
77-
78-
is_bookworm() {
79-
if [[ -f /etc/os-release ]]; then
80-
grep -cq "bookworm" /etc/os-release &> /dev/null && echo "1" || echo "0"
81-
fi
82-
}
83-
84-
is_pi5() {
85-
if [[ -f /proc/device-tree/model ]] &&
86-
grep -q "Raspberry Pi 5" /proc/device-tree/model; then
87-
echo "1"
88-
else
89-
echo "0"
90-
fi
91-
}
92-
93-
is_ubuntu_arm() {
94-
if [[ "$(is_raspberry_pi)" = "1" ]] &&
95-
grep -q "ubuntu" /etc/os-release; then
96-
echo "1"
97-
else
98-
echo "0"
99-
fi
100-
}
101-
102-
is_armbian() {
103-
if grep -q "Armbian" /etc/os-release; then
104-
echo "1"
105-
else
106-
echo "0"
107-
fi
108-
}
68+
# shellcheck source=./libs/helper_fn.sh
69+
. "${BASE_CN_BIN_PATH}/../libs/helper_fn.sh"
10970

11071
### Get avail mem
11172
get_avail_mem() {
@@ -142,10 +103,7 @@ clone_ustreamer() {
142103
clone_cstreamer() {
143104
## Special handling because only supported on Raspberry Pi
144105
[[ -n "${CROWSNEST_UNATTENDED}" ]] || CROWSNEST_UNATTENDED="0"
145-
if { [[ "$(is_raspberry_pi)" = "0" ]] ||
146-
[[ "$(is_pi5)" = "1" ]] ||
147-
[[ "$(is_ubuntu_arm)" = "1" ]] ||
148-
[[ "$(is_armbian)" = "1" ]]; } &&
106+
if [[ "$(use_cs)" = "0" ]] &&
149107
[[ "${CROWSNEST_UNATTENDED}" = "0" ]]; then
150108
printf "Device is not supported! Cloning camera-streamer ... [SKIPPED]\n"
151109
return

custompios/README.md

Lines changed: 0 additions & 42 deletions
This file was deleted.

custompios/crowsnest/config

Lines changed: 0 additions & 37 deletions
This file was deleted.

custompios/crowsnest/start_chroot_script

Lines changed: 0 additions & 99 deletions
This file was deleted.

libs/core.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,7 @@ function check_apps {
9595
fi
9696

9797
## Avoid dependency check if non rpi sbc
98-
if [[ "$(is_raspberry_pi)" = "1" ]] &&
99-
[[ "$(is_ubuntu_arm)" = "0" ]] &&
100-
[[ "$(is_armbian)" = "0" ]] &&
101-
[[ "$(is_pi5)" = "0" ]]; then
98+
if [[ "$(use_cs)" = "1" ]]; then
10299
if [[ -x "${BASE_CN_PATH}/${cstreamer}" ]]; then
103100
log_msg "Dependency: '${cstreamer##*/}' found in ${cstreamer}."
104101
else

libs/helper_fn.sh

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
#!/usr/bin/env bash
2+
3+
#### crowsnest - A webcam Service for multiple Cams and Stream Services.
4+
####
5+
#### Written by Patrick Gehrsitz aka mryel00 <mryel00.github@gmail.com>
6+
#### Copyright 2025 - till today
7+
#### https://github.com/mainsail-crew/crowsnest
8+
####
9+
#### This File is distributed under GPLv3
10+
####
11+
12+
# shellcheck enable=require-variable-braces
13+
14+
# Exit on errors
15+
set -Ee
16+
17+
# Debug
18+
# set -x
19+
20+
is_raspios() {
21+
if [[ -f /etc/rpi-issue ]]; then
22+
echo "1"
23+
else
24+
echo "0"
25+
fi
26+
}
27+
28+
is_dietpi() {
29+
if [[ -f /boot/config.txt ]] && [[ -d /boot/dietpi ]]; then
30+
echo "1"
31+
else
32+
echo "0"
33+
fi
34+
}
35+
36+
is_buster() {
37+
if [[ -f /etc/os-release ]]; then
38+
grep -cq "buster" /etc/os-release &> /dev/null && echo "1" || echo "0"
39+
fi
40+
}
41+
42+
is_bookworm() {
43+
if [[ -f /etc/os-release ]]; then
44+
grep -cq "bookworm" /etc/os-release &> /dev/null && echo "1" || echo "0"
45+
fi
46+
}
47+
48+
is_raspberry_pi() {
49+
if [[ -f /proc/device-tree/model ]] &&
50+
grep -q "Raspberry" /proc/device-tree/model; then
51+
echo "1"
52+
else
53+
echo "0"
54+
fi
55+
}
56+
57+
is_pi5() {
58+
if [[ -f /proc/device-tree/model ]] &&
59+
grep -q "Raspberry Pi 5" /proc/device-tree/model; then
60+
echo "1"
61+
else
62+
echo "0"
63+
fi
64+
}
65+
66+
is_speederpad() {
67+
if grep -q "Ubuntu 20.04." /etc/os-release &&
68+
[[ "$(uname -rm)" = "4.9.191 aarch64" ]]; then
69+
echo "1"
70+
else
71+
echo "0"
72+
fi
73+
}
74+
75+
use_cs() {
76+
if { [[ "$(is_raspios)" = "1" ]] ||
77+
[[ "$(is_dietpi)" = "1" ]]; } &&
78+
[[ "$(is_pi5)" = "0" ]]; then
79+
echo "1"
80+
else
81+
echo "0"
82+
fi
83+
}

libs/hwhandler.sh

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -158,38 +158,5 @@ detect_mjpeg() {
158158
v4l2-ctl -d "${dev}" --list-formats-ext | grep -c "Motion-JPEG, compressed"
159159
}
160160

161-
## Check if device is raspberry sbc
162-
is_raspberry_pi() {
163-
if [[ -f /proc/device-tree/model ]] &&
164-
grep -q "Raspberry" /proc/device-tree/model; then
165-
echo "1"
166-
else
167-
echo "0"
168-
fi
169-
}
170-
171-
is_pi5() {
172-
if [[ -f /proc/device-tree/model ]] &&
173-
grep -q "Raspberry Pi 5" /proc/device-tree/model; then
174-
echo "1"
175-
else
176-
echo "0"
177-
fi
178-
}
179-
180-
is_ubuntu_arm() {
181-
if [[ "$(is_raspberry_pi)" = "1" ]] &&
182-
grep -q "ubuntu" /etc/os-release; then
183-
echo "1"
184-
else
185-
echo "0"
186-
fi
187-
}
188-
189-
is_armbian() {
190-
if grep -q "Armbian" /etc/os-release; then
191-
echo "1"
192-
else
193-
echo "0"
194-
fi
195-
}
161+
## Helper funcs
162+
. "${BASE_CN_PATH}/libs/helper_fn.sh"

0 commit comments

Comments
 (0)