diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index a12fadb..6003e74 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -890,14 +890,6 @@ spcd_f_ca_write() { # │ f │ pm = package manager │ # ╰───┴──────────────────────╯ -spcd_f_pm_install() { - spcd_step "Install tools" - case "${SPCD_PM}" in - "${SPCD_PM_APT}") spcd_f_pm_pkg_install "apt-utils" ;; - *) ;; - esac -} - # ╭───┬────┬───────╮ # │ f │ pm │ https │ # ╰───┴────┴───────╯ @@ -967,15 +959,27 @@ spcd_f_pm_pkg_clean() { } spcd_f_pm_pkg_install() { - case "${SPCD_PM}" in - "${SPCD_PM_APK}") spcd_run apk add "${1}" ;; - "${SPCD_PM_APT}") spcd_run apt-get install --assume-yes "${1}" ;; - "${SPCD_PM_DNF}") spcd_run dnf install --assumeyes "${1}" ;; - "${SPCD_PM_PACMAN}") spcd_run pacman --sync --noconfirm "${1}" ;; - "${SPCD_PM_ZYPPER}") spcd_run zypper --non-interactive install "${1}" ;; - *) ;; - esac - spcd_f_pm_pkg_clean + if [ -n "${1}" ]; then + local name + for name in "${@}"; do + case "${SPCD_PM}" in + "${SPCD_PM_APK}") spcd_run apk add "${1}" ;; + "${SPCD_PM_APT}") spcd_run apt-get install --assume-yes "${1}" ;; + "${SPCD_PM_DNF}") spcd_run dnf install --assumeyes "${1}" ;; + "${SPCD_PM_PACMAN}") spcd_run pacman --sync --noconfirm "${1}" ;; + "${SPCD_PM_ZYPPER}") + spcd_run zypper --non-interactive install "${1}" + ;; + *) ;; + esac + spcd_f_pm_pkg_clean + done + else + case "${SPCD_PM}" in + "${SPCD_PM_APT}") spcd_f_pm_pkg_install "apt-utils" ;; + *) ;; + esac + fi } spcd_f_pm_pkg_query() { @@ -1570,7 +1574,7 @@ spcd_main() { spcd_step__packages_set_configuration spcd_f_pm_https_trust spcd_f_pm_pkg_update - spcd_f_pm_install + spcd_f_pm_pkg_install # locales spcd_step_in "Locales" spcd_step "Install"