wip/shared

This commit is contained in:
Marc Beninca 2024-05-04 17:50:43 +02:00
parent db70b8fbbf
commit 7688ea0221
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

18
cd.sh
View file

@ -77,14 +77,24 @@ cd_set_environment_variables () {
case "${CD_OS_ID}" in
"${CD_OS_ALMA}"|"${CD_OS_ROCKY}")
CD_CA_ROOT="/etc/pki/ca-trust/source/anchors"
CD_CMD_CA="update-ca-trust"
;;
"${CD_OS_ALPINE}"|"${CD_OS_DEBIAN}"|"${CD_OS_UBUNTU}")
CD_CA_ROOT="/usr/local/share/ca-certificates"
CD_CMD_CA="update-ca-certificates"
;;
esac
cd_split
cd_echo "CD_CA_ROOT"
cd_echo "CD_CA_ROOT" "CD_CMD_CA"
# common
case "${CD_OS_ID}" in
"${CD_OS_ALMA}"|"${CD_OS_ROCKY}")
;;
"${CD_OS_ALPINE}")
;;
"${CD_OS_DEBIAN}"|"${CD_OS_UBUNTU}")
;;
esac
#
case "${CD_OS_ID}" in
"${CD_OS_ALMA}")
@ -94,7 +104,6 @@ cd_set_environment_variables () {
"8"|"9") ;;
*) cd_error_os "CD_OS_VERSION" ;;
esac
CD_CMD_CA="update-ca-trust"
CD_CMD_CLEAN="dnf clean all"
CD_CMD_INSTALL="dnf install --assumeyes"
CD_CMD_UPDATE="dnf makecache"
@ -122,7 +131,6 @@ skip_if_unavailable=False
"3.18"|"3.19") ;;
*) cd_error_os "CD_OS_VERSION" ;;
esac
CD_CMD_CA="update-ca-certificates"
CD_CMD_CLEAN="apk cache purge"
CD_CMD_INSTALL="apk add"
CD_CMD_UPDATE="apk update"
@ -146,7 +154,6 @@ skip_if_unavailable=False
"bullseye") CD_PYTHON_COMMAND="python3.9" ;;
*) cd_error_os "CD_OS_VERSION" ;;
esac
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"
@ -194,8 +201,7 @@ Dir::Etc::SourceParts \"\";
CD_PROJECT_URL="${CD_PROJECTS_URL}/${CD_PROJECT_NAME}"
#
cd_split
cd_echo "CD_CMD_CA" \
"CD_CMD_CLEAN" "CD_CMD_INSTALL" "CD_CMD_UPDATE" "CD_CMD_UPGRADE"
cd_echo "CD_CMD_CLEAN" "CD_CMD_INSTALL" "CD_CMD_UPDATE" "CD_CMD_UPGRADE"
cd_split
cd_echo "CD_PKG_PKG"
cd_split