wip/common

This commit is contained in:
Marc Beninca 2024-05-04 17:10:00 +02:00
parent ccd9464329
commit 1f1cd59e19
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

8
cd.sh
View file

@ -42,7 +42,8 @@ cd_main () {
cd_set_environment_variables () {
cd_step "Set environment variables"
# operating system
case "$(cd_grep_os ID)" in
CD_OS_ID="$(cd_grep_os ID)"
case "${CD_OS_ID}" in
"almalinux")
CD_OS_ID="${CD_OS_ALMA}"
CD_OS_VERSION=$(cd_grep_os VERSION_ID \
@ -57,11 +58,15 @@ cd_set_environment_variables () {
CD_OS_ID="${CD_OS_DEBIAN}"
CD_OS_VERSION="$(cd_grep_os VERSION_CODENAME)"
;;
*) cd_error_os "CD_OS_ID" ;;
esac
# universal
CD_DNS_FILE="/etc/resolv.conf"
CD_PKG_CA="ca-certificates"
CD_PKG_GIT="git"
# common
case "${CD_OS_ID}" in
esac
#
case "${CD_OS_ID}" in
"${CD_OS_ALMA}")
@ -145,7 +150,6 @@ Dir::Etc::SourceParts \"\";
CD_PYTHON_PACKAGE="python3"
CD_PYTHON_PACKAGES="/usr/lib/python3/dist-packages"
;;
*) cd_error_os "CD_OS_ID" ;;
esac
# variables
[ "${CD_CA_1}" ] && CD_CA=true