From e40480a0ed07f8911a35d6b9cc4d16386d6ac5a4 Mon Sep 17 00:00:00 2001 From: Pierre Kancir Date: Wed, 3 Jun 2020 18:53:35 +0200 Subject: [PATCH] Tools: install-prereqs-ubuntu : fix package_is_installed --- Tools/environment_install/install-prereqs-ubuntu.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tools/environment_install/install-prereqs-ubuntu.sh b/Tools/environment_install/install-prereqs-ubuntu.sh index d14312585e..29da12da95 100755 --- a/Tools/environment_install/install-prereqs-ubuntu.sh +++ b/Tools/environment_install/install-prereqs-ubuntu.sh @@ -41,11 +41,11 @@ fi $APT_GET update function package_is_installed() { - return $(dpkg-query -W -f='${Status}' "$1" 2>/dev/null | grep -c "ok installed") + dpkg-query -W -f='${Status}' "$1" 2>/dev/null | grep -c "ok installed" } # Install lsb-release as it is needed to check Ubuntu version -if package_is_installed "lsb-release" -ne 1; then +if package_is_installed "lsb-release" -eq 1; then echo "$sep" echo "Installing lsb-release" echo "$sep" @@ -154,7 +154,7 @@ echo "Done!" echo "$sep" echo "Removing modemmanager package that could conflict with firmware uploading" echo "$sep" -if package_is_installed "modemmanager" -ne 1; then +if package_is_installed "modemmanager" -eq 1; then $APT_GET remove modemmanager fi echo "Done!"