This commit is contained in:
Marc Beninca 2024-05-10 22:40:01 +02:00
parent aa7d2718a7
commit f2c422c909
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

18
cd.sh
View file

@ -106,24 +106,32 @@ cd_set_environment_variables () {
CD_DNS_FILE="/etc/resolv.conf" CD_DNS_FILE="/etc/resolv.conf"
CD_PKG_GIT="git" CD_PKG_GIT="git"
cd_split cd_split
cd_echo "CD_DNS_FILE" "CD_PKG_CA" "CD_PKG_GIT" cd_echo "CD_DNS_FILE" "CD_PKG_GIT"
# shared # shared
case "${CD_OS_ID}" in case "${CD_OS_ID}" in
"${CD_OS_ALMA}"|"${CD_OS_FEDORA}"|"${CD_OS_ROCKY}") "${CD_OS_ALMA}"|"${CD_OS_FEDORA}"|"${CD_OS_ROCKY}")
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_PKG_CA="ca-certificates"
;;
"${CD_OS_ALPINE}")
CD_CA_ROOT="/usr/local/share/ca-certificates"
CD_CMD_CA="update-ca-certificates"
CD_PKG_CA="ca-certificates-bundle"
;; ;;
"${CD_OS_ARCH}") "${CD_OS_ARCH}")
CD_CA_ROOT="/etc/ca-certificates/trust-source/anchors" CD_CA_ROOT="/etc/ca-certificates/trust-source/anchors"
CD_CMD_CA="update-ca-trust" CD_CMD_CA="update-ca-trust"
CD_PKG_CA="ca-certificates"
;; ;;
"${CD_OS_ALPINE}"|"${CD_OS_DEBIAN}"|"${CD_OS_UBUNTU}") "${CD_OS_DEBIAN}"|"${CD_OS_UBUNTU}")
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_PKG_CA="ca-certificates"
;; ;;
esac esac
cd_split cd_split
cd_echo "CD_CA_ROOT" "CD_CMD_CA" cd_echo "CD_CA_ROOT" "CD_CMD_CA" "CD_PKG_CA"
# common # common
case "${CD_OS_ID}" in case "${CD_OS_ID}" in
"${CD_OS_ALMA}"|"${CD_OS_FEDORA}"|"${CD_OS_ROCKY}") "${CD_OS_ALMA}"|"${CD_OS_FEDORA}"|"${CD_OS_ROCKY}")
@ -132,7 +140,6 @@ cd_set_environment_variables () {
CD_CMD_QUERY="rpm --query" CD_CMD_QUERY="rpm --query"
CD_CMD_UPDATE="dnf makecache" CD_CMD_UPDATE="dnf makecache"
CD_CMD_UPGRADE="dnf upgrade --assumeyes" CD_CMD_UPGRADE="dnf upgrade --assumeyes"
CD_PKG_CA="ca-certificates"
CD_PKG_PKG="" CD_PKG_PKG=""
CD_PM_CONF_PATH="/etc/dnf/dnf.conf" CD_PM_CONF_PATH="/etc/dnf/dnf.conf"
CD_PM_CONF_TEXT="\ CD_PM_CONF_TEXT="\
@ -152,7 +159,6 @@ skip_if_unavailable=False
CD_CMD_QUERY="apk info" CD_CMD_QUERY="apk info"
CD_CMD_UPDATE="apk update" CD_CMD_UPDATE="apk update"
CD_CMD_UPGRADE="apk upgrade" CD_CMD_UPGRADE="apk upgrade"
CD_PKG_CA="ca-certificates-bundle"
CD_PKG_PKG="" CD_PKG_PKG=""
CD_PM_CONF_PATH="" CD_PM_CONF_PATH=""
CD_PM_CONF_TEXT="" CD_PM_CONF_TEXT=""
@ -165,7 +171,6 @@ skip_if_unavailable=False
CD_CMD_QUERY="pacman --query" CD_CMD_QUERY="pacman --query"
CD_CMD_UPDATE="pacman --sync --refresh" CD_CMD_UPDATE="pacman --sync --refresh"
CD_CMD_UPGRADE="pacman --sync --sysupgrade --noconfirm" CD_CMD_UPGRADE="pacman --sync --sysupgrade --noconfirm"
CD_PKG_CA="ca-certificates"
CD_PKG_PKG="" CD_PKG_PKG=""
CD_PM_CONF_PATH="" CD_PM_CONF_PATH=""
CD_PM_CONF_TEXT="" CD_PM_CONF_TEXT=""
@ -178,7 +183,6 @@ skip_if_unavailable=False
CD_CMD_QUERY="dpkg-query --show" CD_CMD_QUERY="dpkg-query --show"
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_CA="ca-certificates"
CD_PKG_PKG="apt-utils" CD_PKG_PKG="apt-utils"
CD_PM_CONF_PATH="/etc/apt/apt.conf.d/apt.conf" CD_PM_CONF_PATH="/etc/apt/apt.conf.d/apt.conf"
CD_PM_CONF_TEXT="\ CD_PM_CONF_TEXT="\