Skip to content

Commit 655b018

Browse files
committed
refactor: use helper_fn.sh in test_install.sh
Signed-off-by: Patrick Gehrsitz <[email protected]>
1 parent 2a05fce commit 655b018

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

tools/test_install.sh

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,6 @@ set -eou pipefail
1717
TEST_SERVICE_FILE="/etc/systemd/system/crowsnest.service"
1818

1919

20-
is_raspios() {
21-
if [[ -f /etc/rpi-issue ]]; then
22-
echo "1"
23-
else
24-
echo "0"
25-
fi
26-
}
27-
2820
get_vars() {
2921
INSTALLED_AS="$(grep "User" /etc/systemd/system/crowsnest.service | cut -f2 -d= | sed 's/^ //' | cut -f1 -d' ')"
3022
REPO_PATH="$(grep "WorkingDirectory" /etc/systemd/system/crowsnest.service | cut -f2 -d= | sed 's/^ //' | cut -f1 -d' ')"
@@ -89,6 +81,8 @@ main() {
8981
printf "TEST: ustreamer binary build? ..."
9082
[[ -x "${REPO_PATH}/bin/ustreamer/ustreamer" ]] && printf "[YES]\n" || printf "[NO]\n"
9183

84+
printf "TEST: Import helper functions ..."
85+
. "${REPO_PATH}/libs/helper_fn.sh"
9286
printf "TEST: camera-streamer repo cloned? ..."
9387
if [[ "$(is_raspios)" = "1" ]]; then
9488
[[ -d "${REPO_PATH}/bin/camera-streamer" ]] && printf "[OK]\n" || printf "[NOT FOUND]\n"

0 commit comments

Comments
 (0)