This commit is contained in:
Marc Beninca 2024-05-04 00:03:04 +02:00
parent e5d17cd0f0
commit cf446063a9
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

7
cd.sh
View file

@ -67,6 +67,7 @@ cd_set_environment_variables () {
CD_CA_ROOT="/etc/pki/ca-trust/source/anchors" CD_CA_ROOT="/etc/pki/ca-trust/source/anchors"
CD_CMD_CA="update-ca-trust" CD_CMD_CA="update-ca-trust"
CD_CMD_CLEAN="dnf clean all" CD_CMD_CLEAN="dnf clean all"
CD_CMD_INSTALL="dnf install --assumeyes"
CD_CMD_UPDATE="dnf makecache" CD_CMD_UPDATE="dnf makecache"
CD_CMD_UPGRADE="dnf upgrade --assumeyes" CD_CMD_UPGRADE="dnf upgrade --assumeyes"
CD_PKG_PKG="" CD_PKG_PKG=""
@ -97,6 +98,7 @@ skip_if_unavailable=False
CD_CA_ROOT="/usr/local/share/ca-certificates" CD_CA_ROOT="/usr/local/share/ca-certificates"
CD_CMD_CA="update-ca-certificates" CD_CMD_CA="update-ca-certificates"
CD_CMD_CLEAN="apt-get clean" CD_CMD_CLEAN="apt-get clean"
CD_CMD_INSTALL="apt-get install --assume-yes"
CD_CMD_UPDATE="apt-get update" CD_CMD_UPDATE="apt-get update"
CD_CMD_UPGRADE="apt-get upgrade --assume-yes" CD_CMD_UPGRADE="apt-get upgrade --assume-yes"
CD_PKG_PKG="apt-utils" CD_PKG_PKG="apt-utils"
@ -354,10 +356,7 @@ local variable="${1}"
cd_install_package () { cd_install_package () {
if [ "${1}" ] ; then if [ "${1}" ] ; then
case "${CD_OS_ID}" in ${CD_CMD_INSTALL} "${1}" || exit
"${CD_OS_DEBIAN}") apt-get install --assume-yes "${1}" || exit ;;
"${CD_OS_ALMA}") dnf install --assumeyes "${1}" || exit ;;
esac
fi fi
} }