Compare commits

...

3 commits

Author SHA1 Message Date
ea49325b9f
deb/py
Some checks failed
/ job (push) Failing after 2m43s
2024-05-04 00:28:49 +02:00
9070ae9377
cd_ln_python 2024-05-04 00:24:14 +02:00
cf446063a9
install 2024-05-04 00:03:04 +02:00

20
cd.sh
View file

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