From 7eb612472173e787036ff7efd767baf585ff623d Mon Sep 17 00:00:00 2001 From: Dan Schaper Date: Sat, 24 Dec 2016 16:52:46 -0800 Subject: [PATCH] Don't call for package installs if there are no packages to install. Signed-off-by: Dan Schaper --- automated install/basic-install.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index a9b3355a..4edec877 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -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 }