cd_python_alias
Some checks failed
/ job (push) Failing after 5m4s

This commit is contained in:
Marc Beninca 2024-05-23 16:04:04 +02:00
parent 86902bea36
commit 64c65167ba
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

14
cd.sh
View file

@ -108,8 +108,9 @@ cd_set_environment_variables () {
CD_DNS_FILE="/etc/resolv.conf"
CD_PKG_CA="ca-certificates"
CD_PKG_GIT="git"
CD_PYTHON_ALIAS="python3"
cd_split
cd_echo "CD_DNS_FILE" "CD_PKG_CA" "CD_PKG_GIT"
cd_echo "CD_DNS_FILE" "CD_PKG_CA" "CD_PKG_GIT" "CD_PYTHON_ALIAS"
# set ca command & root
case "${CD_OS_ID}" in
"${CD_OS_ALMA}"|"${CD_OS_FEDORA}"|"${CD_OS_ROCKY}")
@ -297,7 +298,7 @@ Dir::Etc::SourceParts \"\";
CD_PYTHON_PACKAGES="/usr/lib/${CD_PYTHON_COMMAND}/site-packages"
;;
"${CD_OS_DEBIAN}"|"${CD_OS_UBUNTU}")
CD_PYTHON_PACKAGES="/usr/lib/python3/dist-packages"
CD_PYTHON_PACKAGES="/usr/lib/${CD_PYTHON_ALIAS}/dist-packages"
;;
esac
cd_split
@ -535,7 +536,7 @@ ${self}
${1}
"
"${CD_PYTHON_COMMAND}" -m "${1}" "${CD_STEP}" "${self}"
"${CD_PYTHON_ALIAS}" -m "${1}" "${CD_STEP}" "${self}"
}
# functions
@ -584,9 +585,10 @@ cd_install_package () {
}
cd_ln_python () {
if [ "${1}" ] ; then
echo "python3 → ${1}"
ln -f -s "${1}" "/usr/bin/python3" || exit
local command="${1}"
if [ "${command}" ] ; then
echo "${CD_PYTHON_ALIAS}${command}"
ln -f -s "${command}" "/usr/bin/${CD_PYTHON_ALIAS}" || exit
fi
}