Don't call for package installs if there are no packages to install.

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
Dan Schaper 2016-12-24 16:52:46 -08:00
parent f458780ba7
commit 7eb6124721
No known key found for this signature in database
GPG key ID: 572E999E385B7BFC

View file

@ -757,7 +757,10 @@ install_dependent_packages() {
installArray+=("${i}")
fi
done
if [[ ${#installArray[@]} -gt 0 ]]; then
debconf-apt-progress -- ${PKG_INSTALL} "${installArray[@]}"
return
fi
return 0
fi
@ -771,7 +774,10 @@ install_dependent_packages() {
installArray+=("${i}")
fi
done
${PKG_INSTALL} "${installArray[@]}" &> /dev/null
if [[ ${#installArray[@]} -gt 0 ]]; then
${PKG_INSTALL} "${installArray[@]}" &> /dev/null
return
fi
return 0
}