diff options
author | Simon Rettberg | 2021-07-08 10:48:44 +0200 |
---|---|---|
committer | Simon Rettberg | 2021-07-08 10:48:44 +0200 |
commit | d0332747e49a6c1f3879211210c1252458323c50 (patch) | |
tree | 06fe4529d52af6a4f9bc932f6185a874ab5d4c11 /core/bin | |
parent | setup_target: Install all required packages at once at the start (diff) | |
download | mltk-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-x | core/bin/setup_target | 10 |
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 } |