diff --git a/cd.sh b/cd.sh index 235813b..f92cd02 100644 --- a/cd.sh +++ b/cd.sh @@ -73,11 +73,18 @@ cd_set_environment_variables () { CD_PKG_GIT="git" cd_split cd_echo "CD_DNS_FILE" "CD_PKG_CA" "CD_PKG_GIT" - # common + # shared case "${CD_OS_ID}" in "${CD_OS_ALMA}"|"${CD_OS_ROCKY}") + CD_CA_ROOT="/etc/pki/ca-trust/source/anchors" + ;; + "${CD_OS_ALPINE}"|"${CD_OS_DEBIAN}"|"${CD_OS_UBUNTU}") + CD_CA_ROOT="/usr/local/share/ca-certificates" ;; esac + cd_split + cd_echo "CD_CA_ROOT" + # common # case "${CD_OS_ID}" in "${CD_OS_ALMA}") @@ -87,7 +94,6 @@ cd_set_environment_variables () { "8"|"9") ;; *) cd_error_os "CD_OS_VERSION" ;; esac - 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" @@ -116,7 +122,6 @@ skip_if_unavailable=False "3.18"|"3.19") ;; *) cd_error_os "CD_OS_VERSION" ;; esac - CD_CA_ROOT="/usr/local/share/ca-certificates" CD_CMD_CA="update-ca-certificates" CD_CMD_CLEAN="apk cache purge" CD_CMD_INSTALL="apk add" @@ -141,7 +146,6 @@ skip_if_unavailable=False "bullseye") CD_PYTHON_COMMAND="python3.9" ;; *) cd_error_os "CD_OS_VERSION" ;; esac - 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" @@ -190,8 +194,6 @@ Dir::Etc::SourceParts \"\"; CD_PROJECT_URL="${CD_PROJECTS_URL}/${CD_PROJECT_NAME}" # cd_split - cd_echo "CD_CA_ROOT" - cd_split cd_echo "CD_CMD_CA" \ "CD_CMD_CLEAN" "CD_CMD_INSTALL" "CD_CMD_UPDATE" "CD_CMD_UPGRADE" cd_split