This commit is contained in:
Marc Beninca 2024-08-19 10:19:15 +02:00
parent fc5b997288
commit bc5bca4ede
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

13
spcd.sh
View file

@ -28,6 +28,7 @@ spcd_main() {
spcd_set_https_verification_on spcd_set_https_verification_on
spcd_update_packages_catalog spcd_update_packages_catalog
spcd_upgrade_packages spcd_upgrade_packages
spcd_install_dos2unix
spcd_install_git spcd_install_git
spcd_install_python spcd_install_python
# TODO move to Python # TODO move to Python
@ -206,10 +207,12 @@ ${SPCD_PROJECT_ROOT}$(basename "${GITHUB_SERVER_URL}")"
# universal # universal
SPCD_DNS_FILE="/etc/resolv.conf" SPCD_DNS_FILE="/etc/resolv.conf"
SPCD_PKG_CA="ca-certificates" SPCD_PKG_CA="ca-certificates"
SPCD_PKG_DOS2UNIX="dos2unix"
SPCD_PKG_GIT="git" SPCD_PKG_GIT="git"
SPCD_PYTHON_ALIAS="python3" SPCD_PYTHON_ALIAS="python3"
spcd_split spcd_split
spcd_echo "SPCD_DNS_FILE" "SPCD_PKG_CA" "SPCD_PKG_GIT" "SPCD_PYTHON_ALIAS" spcd_echo "SPCD_DNS_FILE" \
"SPCD_PKG_CA" "SPCD_PKG_DOS2UNIX" "SPCD_PKG_GIT" "SPCD_PYTHON_ALIAS"
# set ca command & root # set ca command & root
case "${SPCD_OS_ID}" in case "${SPCD_OS_ID}" in
"${SPCD_OS_ALMA}" | "${SPCD_OS_FEDORA}" | "${SPCD_OS_ROCKY}") "${SPCD_OS_ALMA}" | "${SPCD_OS_FEDORA}" | "${SPCD_OS_ROCKY}")
@ -587,6 +590,11 @@ spcd_upgrade_packages() {
${SPCD_PM_UPGRADE} || exit ${SPCD_PM_UPGRADE} || exit
} }
spcd_install_dos2unix() {
spcd_step "Install dos2unix"
spcd_install_package "${SPCD_PKG_DOS2UNIX}"
}
spcd_install_git() { spcd_install_git() {
spcd_step "Install Git" spcd_step "Install Git"
spcd_install_package "${SPCD_PKG_GIT}" spcd_install_package "${SPCD_PKG_GIT}"
@ -601,9 +609,6 @@ spcd_install_python() {
# TODO move to Python # TODO move to Python
spcd_install_packages() { spcd_install_packages() {
# dos2unix
spcd_step "Install dos2unix"
spcd_install_package "dos2unix"
# epel # epel
spcd_step "Install EPEL" spcd_step "Install EPEL"
case "${SPCD_OS_ID}" in case "${SPCD_OS_ID}" in