From 1652a1545bf872fb6a2789ee3d7f13da465ab23e Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 4 May 2024 22:36:30 +0200 Subject: [PATCH] wip/pkgconf --- cd.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/cd.sh b/cd.sh index 500b144..f61491a 100644 --- a/cd.sh +++ b/cd.sh @@ -14,9 +14,9 @@ rwx \ cd_main () { cd_set_environment_variables cd_set_packages_repositories + cd_set_packages_configuration # cd_list_working_directory - cd_set_packages_configuration cd_set_https_verification_off cd_set_dns_resolving cd_update_packages_catalog @@ -232,12 +232,6 @@ Dir::Etc::SourceParts \"\"; esac cd_split cd_echo "CD_PYTHON_COMMAND" "CD_PYTHON_PACKAGE" "CD_PYTHON_PACKAGES" - # TODO - case "${CD_OS_ID}" in - "${CD_OS_DEBIAN}") - export DEBIAN_FRONTEND="noninteractive" - ;; - esac # variables [ "${CD_CA_1}" ] && CD_CA=true # continuous integration platform @@ -310,6 +304,16 @@ deb ${CD_OS_REPO}-security ${CD_OS_VERSION}-security main esac } +cd_set_packages_configuration () { + cd_step "Set packages configuration" + cd_write "${CD_PM_CONF_PATH}" "${CD_PM_CONF_TEXT}" + case "${CD_OS_ID}" in + "${CD_OS_DEBIAN}"|"${CD_OS_UBUNTU}") + export DEBIAN_FRONTEND="noninteractive" + ;; + esac +} + # agnostic steps cd_list_working_directory () { @@ -317,12 +321,8 @@ cd_list_working_directory () { cd_ls "." } -cd_set_packages_configuration () { - cd_step "Set packages configuration" - cd_write "${CD_PM_CONF_PATH}" "${CD_PM_CONF_TEXT}" -} - cd_set_https_verification_off () { + # TODO if [ "${CD_CA}" -o "${CD_OS_ID}" = "${CD_OS_DEBIAN}" ] ; then cd_step "Set HTTPS verification off" cd_mkdir "$(dirname "${CD_PM_HTTPS_PATH}")"