From cf446063a90f6973de7ba7ca3e23fd544cfdc3fd Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 4 May 2024 00:03:04 +0200 Subject: [PATCH] install --- cd.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cd.sh b/cd.sh index a9b5700..8424c29 100644 --- a/cd.sh +++ b/cd.sh @@ -67,6 +67,7 @@ cd_set_environment_variables () { CD_CA_ROOT="/etc/pki/ca-trust/source/anchors" CD_CMD_CA="update-ca-trust" CD_CMD_CLEAN="dnf clean all" + CD_CMD_INSTALL="dnf install --assumeyes" CD_CMD_UPDATE="dnf makecache" CD_CMD_UPGRADE="dnf upgrade --assumeyes" CD_PKG_PKG="" @@ -97,6 +98,7 @@ skip_if_unavailable=False CD_CA_ROOT="/usr/local/share/ca-certificates" CD_CMD_CA="update-ca-certificates" CD_CMD_CLEAN="apt-get clean" + CD_CMD_INSTALL="apt-get install --assume-yes" CD_CMD_UPDATE="apt-get update" CD_CMD_UPGRADE="apt-get upgrade --assume-yes" CD_PKG_PKG="apt-utils" @@ -354,10 +356,7 @@ local variable="${1}" cd_install_package () { if [ "${1}" ] ; then - case "${CD_OS_ID}" in - "${CD_OS_DEBIAN}") apt-get install --assume-yes "${1}" || exit ;; - "${CD_OS_ALMA}") dnf install --assumeyes "${1}" || exit ;; - esac + ${CD_CMD_INSTALL} "${1}" || exit fi }