Skip to content

Commit

Permalink
optimize pip module check
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvinSchiller committed Oct 26, 2023
1 parent 8806b61 commit a49c6f6
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions scripts/installscripts/tests/test_installation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,6 @@ python3-cffi python3-ply python3-pycparser python3-spotify"
fi

local apt_list_installed=$(apt -qq list --installed 2>/dev/null)
echo "--- apt list installed ---"
echo "${apt_list_installed}"
echo "--------------------------"

for package in ${packages}
do
if [[ $(echo "${apt_list_installed}" | grep "${package}.*installed") ]]; then
Expand Down Expand Up @@ -234,9 +230,10 @@ verify_pip_packages() {
fi
fi

local pip_list_installed=$(pip3 list)
for module in ${modules}
do
if [[ $(pip3 show "${module}") ]]; then
if [[ $(echo "${pip_list_installed}" | grep "${module}") ]]; then
echo " ${module} is installed"
else
echo " ERROR: pip module ${module} is not installed"
Expand Down

0 comments on commit a49c6f6

Please sign in to comment.