updated check of required packages 75/475/1
authordavidplunkett <dp7642@att.com>
Fri, 15 Mar 2019 20:10:13 +0000 (20:10 +0000)
committerdavidplunkett <dp7642@att.com>
Fri, 15 Mar 2019 20:10:13 +0000 (20:10 +0000)
Change-Id: Ib5f97be1e0caf098a020e3df815cb28653bf5d72
Signed-off-by: davidplunkett <dp7642@att.com>
setup_tools.sh

index adeb4ad..08b6d50 100755 (executable)
@@ -64,9 +64,10 @@ mkdir -p $DHCP_ROOT
 mkdir -p $BUILD_ROOT
 
 ## CHECK THAT REQUIRED PACKAGES ARE INSTALLED
-PACKAGES="xorriso sshpass python-requests coreutils"
+echo "Checking for known required packages"
+PACKAGES="xorriso sshpass python-requests python-pip coreutils"
 for PKG in $PACKAGES ; do
-    if ! dpkg -l | grep $PKG >>/dev/null; then
+    if ! apt list $PKG 2>/dev/null | grep "$PKG.*installed.*" ; then
         echo "Attempting to install missing package $PKG"
         if ! apt-get install -y $PKG; then
             echo "FAILED:  required package $PKG not found.  try sudo 'apt-get install $PKG -y'"