---
 support/install-deb-dependencies | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/support/install-deb-dependencies b/support/install-deb-dependencies
index 1bdac15..bb09277 100755
--- a/support/install-deb-dependencies
+++ b/support/install-deb-dependencies
@@ -35,13 +35,17 @@ debian_pkg_list="$(find "$CHECKBOX_TOP" -path 
'*/requirements/deb-*.txt' -exec c
 
 # Check each one and install if required
 echo "I: checking if the following Debian packages are installed:" 
$debian_pkg_list
+dpkgs_to_install_list=""
 for debian_pkg in $debian_pkg_list; do
     if [ "$(dpkg-query -s $debian_pkg 2>/dev/null | grep '^Status:')" != 
"Status: install ok installed" ]; then
-        echo "I: package $debian_pkg is missing, installing"
-        if [ $(id -u) != 0 ]; then
-            sudo apt-get install --quiet --quiet --yes $debian_pkg
-        else
-            apt-get install --quiet --quiet --yes $debian_pkg
-        fi
+        echo "I: package $debian_pkg is missing, queueing for install"
+        dpkgs_to_install_list="$dpkgs_to_install_list $debian_pkg"
     fi
 done
+if [ -n "$dpkgs_to_install_list" ]; then
+    if [ $(id -u) != 0 ]; then
+        sudo apt-get install --quiet --quiet --yes $dpkgs_to_install_list
+    else
+        apt-get install --quiet --quiet --yes $dpkgs_to_install_list
+    fi
+fi
-- 
1.8.1.2


-- 
Mailing list: https://launchpad.net/~checkbox-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~checkbox-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to