Compare commits

..

No commits in common. "ea49325b9fb5dbba6119bf7e7c0b60fbac203682" and "e5d17cd0f010a506b34dc2dcfbabd27336a2026a" have entirely different histories.

20
cd.sh
View file

@ -67,7 +67,6 @@ cd_set_environment_variables () {
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"
CD_CMD_UPDATE="dnf makecache"
CD_CMD_UPGRADE="dnf upgrade --assumeyes"
CD_PKG_PKG=""
@ -92,14 +91,12 @@ skip_if_unavailable=False
CD_OS_REPO="${CD_DEFAULT_REPO_DEBIAN}"
[ "${CD_REPO_DEBIAN}" ] && CD_OS_REPO="${CD_REPO_DEBIAN}"
case "${CD_OS_VERSION}" in
"bookworm") CD_PYTHON_COMMAND="python3.11" ;;
"bullseye") CD_PYTHON_COMMAND="python3.9" ;;
"bookworm"|"bullseye") cd_nop ;;
*) 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"
CD_CMD_UPDATE="apt-get update"
CD_CMD_UPGRADE="apt-get upgrade --assume-yes"
CD_PKG_PKG="apt-utils"
@ -113,6 +110,7 @@ Dir::Etc::SourceParts \"\";
"
CD_PM_HTTPS_PATH="/etc/apt/apt.conf.d/https"
CD_PM_HTTPS_TEXT="Acquire::https::Verify-Peer False;"
CD_PYTHON_COMMAND="python3"
CD_PYTHON_PACKAGE="python3"
CD_PYTHON_PACKAGES="/usr/lib/python3/dist-packages"
;;
@ -264,8 +262,6 @@ cd_install_git () {
cd_install_python () {
cd_step "Install Python"
cd_install_package "${CD_PYTHON_PACKAGE}"
cd_split
cd_ln_python "${CD_PYTHON_COMMAND}"
}
cd_clean_packages_cache () {
@ -358,14 +354,10 @@ local variable="${1}"
cd_install_package () {
if [ "${1}" ] ; then
${CD_CMD_INSTALL} "${1}" || exit
fi
}
cd_ln_python () {
if [ "${1}" ] ; then
echo "python3 → ${1}"
ln --force --symbolic "${1}" "/usr/bin/python3" || exit
case "${CD_OS_ID}" in
"${CD_OS_DEBIAN}") apt-get install --assume-yes "${1}" || exit ;;
"${CD_OS_ALMA}") dnf install --assumeyes "${1}" || exit ;;
esac
fi
}