This commit is contained in:
Marc Beninca 2024-05-04 22:20:41 +02:00
parent 7c0908b120
commit 1b5ef403c7
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

15
cd.sh
View file

@ -114,6 +114,7 @@ cd_set_environment_variables () {
CD_CMD_INSTALL="dnf install --assumeyes"
CD_CMD_UPDATE="dnf makecache"
CD_CMD_UPGRADE="dnf upgrade --assumeyes"
CD_PKG_PKG=""
CD_PM_CONF_PATH="/etc/dnf/dnf.conf"
CD_PM_CONF_TEXT="\
[main]
@ -131,6 +132,7 @@ skip_if_unavailable=False
CD_CMD_INSTALL="apk add"
CD_CMD_UPDATE="apk update"
CD_CMD_UPGRADE="apk upgrade"
CD_PKG_PKG=""
CD_PM_CONF_PATH=""
CD_PM_CONF_TEXT=""
CD_PM_HTTPS_PATH="/etc/apk/repositories.d/https"
@ -141,6 +143,7 @@ skip_if_unavailable=False
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"
CD_PM_CONF_PATH="/etc/apt/apt.conf.d/apt.conf"
CD_PM_CONF_TEXT="\
Acquire::Check-Valid-Until True;
@ -156,7 +159,7 @@ Dir::Etc::SourceParts \"\";
cd_split
cd_echo "CD_CMD_CLEAN" "CD_CMD_INSTALL" "CD_CMD_UPDATE" "CD_CMD_UPGRADE"
cd_split
cd_echo "CD_PM_CONF_PATH" "CD_PM_HTTPS_PATH"
cd_echo "CD_PKG_PKG" "CD_PM_CONF_PATH" "CD_PM_HTTPS_PATH"
# specific
case "${CD_OS_ID}" in
"${CD_OS_ALMA}")
@ -231,20 +234,10 @@ Dir::Etc::SourceParts \"\";
cd_echo "CD_PYTHON_COMMAND" "CD_PYTHON_PACKAGE" "CD_PYTHON_PACKAGES"
# TODO
case "${CD_OS_ID}" in
"${CD_OS_ALMA}")
CD_PKG_PKG=""
;;
"${CD_OS_ALPINE}")
CD_PKG_PKG=""
;;
"${CD_OS_DEBIAN}")
export DEBIAN_FRONTEND="noninteractive"
#
CD_PKG_PKG="apt-utils"
;;
esac
cd_split
cd_echo "CD_PKG_PKG"
# variables
[ "${CD_CA_1}" ] && CD_CA=true
# continuous integration platform