Compare commits
3 commits
e5d17cd0f0
...
ea49325b9f
Author | SHA1 | Date | |
---|---|---|---|
ea49325b9f | |||
9070ae9377 | |||
cf446063a9 |
1 changed files with 14 additions and 6 deletions
20
cd.sh
20
cd.sh
|
@ -67,6 +67,7 @@ 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=""
|
||||
|
@ -91,12 +92,14 @@ 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"|"bullseye") cd_nop ;;
|
||||
"bookworm") CD_PYTHON_COMMAND="python3.11" ;;
|
||||
"bullseye") CD_PYTHON_COMMAND="python3.9" ;;
|
||||
*) 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"
|
||||
|
@ -110,7 +113,6 @@ 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"
|
||||
;;
|
||||
|
@ -262,6 +264,8 @@ 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 () {
|
||||
|
@ -354,10 +358,14 @@ local variable="${1}"
|
|||
|
||||
cd_install_package () {
|
||||
if [ "${1}" ] ; then
|
||||
case "${CD_OS_ID}" in
|
||||
"${CD_OS_DEBIAN}") apt-get install --assume-yes "${1}" || exit ;;
|
||||
"${CD_OS_ALMA}") dnf install --assumeyes "${1}" || exit ;;
|
||||
esac
|
||||
${CD_CMD_INSTALL} "${1}" || exit
|
||||
fi
|
||||
}
|
||||
|
||||
cd_ln_python () {
|
||||
if [ "${1}" ] ; then
|
||||
echo "python3 → ${1}"
|
||||
ln --force --symbolic "${1}" "/usr/bin/python3" || exit
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue