pm/pkg/install
This commit is contained in:
parent
d453e5eb67
commit
0c050ca1ae
1 changed files with 22 additions and 18 deletions
|
@ -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() {
|
||||
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}" ;;
|
||||
"${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"
|
||||
|
|
Loading…
Reference in a new issue