Skip to content

Commit

Permalink
chore: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mryel00 committed Nov 7, 2023
1 parent 5f34675 commit 8c99417
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
6 changes: 5 additions & 1 deletion tools/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ main() {

if [[ -z "${INSTALL_CS}" ]]; then
msg "Doing some tests ...\n"
INSTALL_CS="$(shallow_cs_dependencies_check)"
if shallow_cs_dependencies_check; then
INSTALL_CS="1"
else
INSTALL_CS="0"
fi
status_msg "Doing some tests ..." "0"
fi

Expand Down
13 changes: 6 additions & 7 deletions tools/libs/core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,22 +73,21 @@ shallow_cs_dependencies_check() {
if ! [[ $(test_load_module ${SHALLOW_CHECK_MODULESLIST}) ]]; then
status_msg "Checking for required kernel module ..." "3"
msg "Not all required kernel modules can be loaded ..."
echo 0
return
return 1
fi
status_msg "Checking for required kernel module ..." "0"

msg "Checking for required packages ...\n"
# Update the number below if you update SHALLOW_CHECK_PKGLIST
SHALLOW_CHECK_PKGLIST="^(libavformat-dev|libavutil-dev|libavcodec-dev|libcamera-dev|libcamera-apps-lite)$"
if [[ $(apt-cache search --names-only "${SHALLOW_CHECK_PKGLIST}" &> /dev/null) -eq 5 ]]; then
status_msg "Checking for required packages ..." "0"
echo 1
else
if ! [[ $(apt-cache search --names-only "${SHALLOW_CHECK_PKGLIST}" &> /dev/null) -eq 5 ]]; then
status_msg "Checking for required packages ..." "3"
msg "Not all required packages can be installed ..."
echo 0
return 1
fi
status_msg "Checking for required packages ..." "0"

return 0
}

link_pkglist_rpi() {
Expand Down

0 comments on commit 8c99417

Please sign in to comment.