parent
86902bea36
commit
64c65167ba
1 changed files with 8 additions and 6 deletions
14
cd.sh
14
cd.sh
|
@ -108,8 +108,9 @@ cd_set_environment_variables () {
|
||||||
CD_DNS_FILE="/etc/resolv.conf"
|
CD_DNS_FILE="/etc/resolv.conf"
|
||||||
CD_PKG_CA="ca-certificates"
|
CD_PKG_CA="ca-certificates"
|
||||||
CD_PKG_GIT="git"
|
CD_PKG_GIT="git"
|
||||||
|
CD_PYTHON_ALIAS="python3"
|
||||||
cd_split
|
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
|
# set ca command & root
|
||||||
case "${CD_OS_ID}" in
|
case "${CD_OS_ID}" in
|
||||||
"${CD_OS_ALMA}"|"${CD_OS_FEDORA}"|"${CD_OS_ROCKY}")
|
"${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_PYTHON_PACKAGES="/usr/lib/${CD_PYTHON_COMMAND}/site-packages"
|
||||||
;;
|
;;
|
||||||
"${CD_OS_DEBIAN}"|"${CD_OS_UBUNTU}")
|
"${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
|
esac
|
||||||
cd_split
|
cd_split
|
||||||
|
@ -535,7 +536,7 @@ ${self}
|
||||||
↓
|
↓
|
||||||
${1}
|
${1}
|
||||||
"
|
"
|
||||||
"${CD_PYTHON_COMMAND}" -m "${1}" "${CD_STEP}" "${self}"
|
"${CD_PYTHON_ALIAS}" -m "${1}" "${CD_STEP}" "${self}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# functions
|
# functions
|
||||||
|
@ -584,9 +585,10 @@ cd_install_package () {
|
||||||
}
|
}
|
||||||
|
|
||||||
cd_ln_python () {
|
cd_ln_python () {
|
||||||
if [ "${1}" ] ; then
|
local command="${1}"
|
||||||
echo "python3 → ${1}"
|
if [ "${command}" ] ; then
|
||||||
ln -f -s "${1}" "/usr/bin/python3" || exit
|
echo "${CD_PYTHON_ALIAS} → ${command}"
|
||||||
|
ln -f -s "${command}" "/usr/bin/${CD_PYTHON_ALIAS}" || exit
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue