summaryrefslogtreecommitdiffstats
path: root/core/bin
diff options
context:
space:
mode:
authorSimon Rettberg2021-07-08 10:48:44 +0200
committerSimon Rettberg2021-07-08 10:48:44 +0200
commitd0332747e49a6c1f3879211210c1252458323c50 (patch)
tree06fe4529d52af6a4f9bc932f6185a874ab5d4c11 /core/bin
parentsetup_target: Install all required packages at once at the start (diff)
downloadmltk-d0332747e49a6c1f3879211210c1252458323c50.tar.gz
mltk-d0332747e49a6c1f3879211210c1252458323c50.tar.xz
mltk-d0332747e49a6c1f3879211210c1252458323c50.zip
setup_target: Don't try to install packages already installed
Diffstat (limited to 'core/bin')
-rwxr-xr-xcore/bin/setup_target10
1 files changed, 7 insertions, 3 deletions
diff --git a/core/bin/setup_target b/core/bin/setup_target
index ebb8218e..ae96b691 100755
--- a/core/bin/setup_target
+++ b/core/bin/setup_target
@@ -72,6 +72,7 @@ unset_required_vars () {
# Install all the packages from all selected modules in current target
install_all_packages () {
local module file config
+ declare -a missing
declare -A packages dupcheck
packages=()
for module in "${!MODULE_PATHS[@]}"; do
@@ -97,9 +98,12 @@ install_all_packages () {
dupcheck["$file"]=1
done
done
- pinfo "Making sure required packages are installed..."
- pdebug "List: ${!packages[*]}"
- install_packages "${!packages[@]}"
+ missing=( $( filter_installed_packages "${!packages[@]}" ) )
+ if [ "${#missing[@]}" -gt 0 ]; then
+ pinfo "Making sure required packages are installed..."
+ pinfo "Potentially missing: ${missing[*]}"
+ install_packages "${missing[@]}"
+ fi
unset_required_vars
}