f/pkg
This commit is contained in:
parent
59105a0c54
commit
373f5ef236
1 changed files with 82 additions and 82 deletions
|
@ -765,6 +765,87 @@ nameserver ${value}
|
|||
fi
|
||||
}
|
||||
|
||||
spcd_f_pkg() {
|
||||
spcd_step_in "OS packages"
|
||||
local file
|
||||
# epel
|
||||
spcd_step "EPEL"
|
||||
case "${SPCD_OS_ID}" in
|
||||
"${SPCD_OS_ALMA}" | "${SPCD_OS_ROCKY}")
|
||||
spcd_f_pm_pkg_install "epel-release"
|
||||
case "${SPCD_OS_VERSION}" in
|
||||
"9")
|
||||
set -- \
|
||||
"-testing" \
|
||||
""
|
||||
;;
|
||||
"8")
|
||||
set -- \
|
||||
"-modular" \
|
||||
"-testing-modular" \
|
||||
"-testing" \
|
||||
""
|
||||
;;
|
||||
*) ;;
|
||||
esac
|
||||
for file in "${@}"; do
|
||||
spcd_os_sed "/etc/yum.repos.d/epel${file}.repo" \
|
||||
"|^metalink|#metalink|" \
|
||||
"|https://download.example/pub/epel|${SPCD_URL_EPEL}|" \
|
||||
"|^#baseurl|baseurl|"
|
||||
done
|
||||
file="/etc/yum.repos.d/epel-cisco-openh264.repo"
|
||||
if [ -f "${file}" ]; then
|
||||
spcd_os_sed "${file}" \
|
||||
"|^enabled=1|enabled=0|"
|
||||
fi
|
||||
;;
|
||||
*) ;;
|
||||
esac
|
||||
# graphviz
|
||||
spcd_step "GraphViz"
|
||||
spcd_f_pm_pkg_install "graphviz"
|
||||
# openssh
|
||||
spcd_step "OpenSSH"
|
||||
case "${SPCD_PM}" in
|
||||
"${SPCD_PM_APK}" | "${SPCD_PM_APT}")
|
||||
spcd_f_pm_pkg_install "openssh-client"
|
||||
;;
|
||||
"${SPCD_PM_DNF}" | "${SPCD_PM_ZYPPER}")
|
||||
spcd_f_pm_pkg_install "openssh-clients"
|
||||
;;
|
||||
"${SPCD_PM_PACMAN}") spcd_f_pm_pkg_install "openssh" ;;
|
||||
*) ;;
|
||||
esac
|
||||
# plantuml
|
||||
spcd_step "PlantUML"
|
||||
spcd_f_pm_pkg_install "plantuml"
|
||||
# rsync
|
||||
spcd_step "Rsync"
|
||||
spcd_f_pm_pkg_install "rsync"
|
||||
# shell check
|
||||
spcd_step "ShellCheck"
|
||||
case "${SPCD_PM}" in
|
||||
"${SPCD_PM_DNF}" | "${SPCD_PM_ZYPPER}")
|
||||
spcd_f_pm_pkg_install "ShellCheck"
|
||||
;;
|
||||
*) spcd_f_pm_pkg_install "shellcheck" ;;
|
||||
esac
|
||||
# shfmt
|
||||
spcd_step "ShellFormat"
|
||||
case "${SPCD_OS_ID}" in
|
||||
"${SPCD_OS_ALMA}" | "${SPCD_OS_ROCKY}") ;;
|
||||
"${SPCD_OS_DEBIAN}")
|
||||
case "${SPCD_OS_VERSION}" in
|
||||
"bullseye") ;;
|
||||
*) spcd_f_pm_pkg_install "shfmt" ;;
|
||||
esac
|
||||
;;
|
||||
*) spcd_f_pm_pkg_install "shfmt" ;;
|
||||
esac
|
||||
spcd_step_out
|
||||
}
|
||||
|
||||
# ╭───┬──────────────────────────────╮
|
||||
# │ f │ ca = certificate authorities │
|
||||
# ╰───┴──────────────────────────────╯
|
||||
|
@ -1479,87 +1560,6 @@ spcd_step__python_modules() {
|
|||
spcd_step_out
|
||||
}
|
||||
|
||||
spcd_step__install_packages() {
|
||||
spcd_step_in "OS packages"
|
||||
local file
|
||||
# epel
|
||||
spcd_step "EPEL"
|
||||
case "${SPCD_OS_ID}" in
|
||||
"${SPCD_OS_ALMA}" | "${SPCD_OS_ROCKY}")
|
||||
spcd_f_pm_pkg_install "epel-release"
|
||||
case "${SPCD_OS_VERSION}" in
|
||||
"9")
|
||||
set -- \
|
||||
"-testing" \
|
||||
""
|
||||
;;
|
||||
"8")
|
||||
set -- \
|
||||
"-modular" \
|
||||
"-testing-modular" \
|
||||
"-testing" \
|
||||
""
|
||||
;;
|
||||
*) ;;
|
||||
esac
|
||||
for file in "${@}"; do
|
||||
spcd_os_sed "/etc/yum.repos.d/epel${file}.repo" \
|
||||
"|^metalink|#metalink|" \
|
||||
"|https://download.example/pub/epel|${SPCD_URL_EPEL}|" \
|
||||
"|^#baseurl|baseurl|"
|
||||
done
|
||||
file="/etc/yum.repos.d/epel-cisco-openh264.repo"
|
||||
if [ -f "${file}" ]; then
|
||||
spcd_os_sed "${file}" \
|
||||
"|^enabled=1|enabled=0|"
|
||||
fi
|
||||
;;
|
||||
*) ;;
|
||||
esac
|
||||
# graphviz
|
||||
spcd_step "GraphViz"
|
||||
spcd_f_pm_pkg_install "graphviz"
|
||||
# openssh
|
||||
spcd_step "OpenSSH"
|
||||
case "${SPCD_PM}" in
|
||||
"${SPCD_PM_APK}" | "${SPCD_PM_APT}")
|
||||
spcd_f_pm_pkg_install "openssh-client"
|
||||
;;
|
||||
"${SPCD_PM_DNF}" | "${SPCD_PM_ZYPPER}")
|
||||
spcd_f_pm_pkg_install "openssh-clients"
|
||||
;;
|
||||
"${SPCD_PM_PACMAN}") spcd_f_pm_pkg_install "openssh" ;;
|
||||
*) ;;
|
||||
esac
|
||||
# plantuml
|
||||
spcd_step "PlantUML"
|
||||
spcd_f_pm_pkg_install "plantuml"
|
||||
# rsync
|
||||
spcd_step "Rsync"
|
||||
spcd_f_pm_pkg_install "rsync"
|
||||
# shell check
|
||||
spcd_step "ShellCheck"
|
||||
case "${SPCD_PM}" in
|
||||
"${SPCD_PM_DNF}" | "${SPCD_PM_ZYPPER}")
|
||||
spcd_f_pm_pkg_install "ShellCheck"
|
||||
;;
|
||||
*) spcd_f_pm_pkg_install "shellcheck" ;;
|
||||
esac
|
||||
# shfmt
|
||||
spcd_step "ShellFormat"
|
||||
case "${SPCD_OS_ID}" in
|
||||
"${SPCD_OS_ALMA}" | "${SPCD_OS_ROCKY}") ;;
|
||||
"${SPCD_OS_DEBIAN}")
|
||||
case "${SPCD_OS_VERSION}" in
|
||||
"bullseye") ;;
|
||||
*) spcd_f_pm_pkg_install "shfmt" ;;
|
||||
esac
|
||||
;;
|
||||
*) spcd_f_pm_pkg_install "shfmt" ;;
|
||||
esac
|
||||
spcd_step_out
|
||||
}
|
||||
|
||||
# ╭──────╮
|
||||
# │ main │
|
||||
# ╰──────╯
|
||||
|
@ -1616,7 +1616,7 @@ spcd_main() {
|
|||
spcd_step_in "Python"
|
||||
spcd_f_py_install
|
||||
spcd_step__python_modules
|
||||
spcd_step__install_packages
|
||||
spcd_f_pkg
|
||||
spcd_f_py_save
|
||||
spcd_f_py_switch
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue