cd_path
This commit is contained in:
parent
17d22283f8
commit
2a19db986c
1 changed files with 5 additions and 4 deletions
9
cd.sh
9
cd.sh
|
@ -40,6 +40,9 @@ cd_main () {
|
||||||
|
|
||||||
cd_set_environment_variables () {
|
cd_set_environment_variables () {
|
||||||
cd_step "Set environment variables"
|
cd_step "Set environment variables"
|
||||||
|
# set path
|
||||||
|
CD_PATH="$(realpath "${0}")"
|
||||||
|
cd_echo "CD_PATH"
|
||||||
# set operating system id
|
# set operating system id
|
||||||
CD_OS_ID="$(cd_grep_os ID)"
|
CD_OS_ID="$(cd_grep_os ID)"
|
||||||
case "${CD_OS_ID}" in
|
case "${CD_OS_ID}" in
|
||||||
|
@ -105,6 +108,7 @@ cd_set_environment_variables () {
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
cd_split
|
||||||
cd_echo "CD_OS_ID" "CD_OS_VERSION"
|
cd_echo "CD_OS_ID" "CD_OS_VERSION"
|
||||||
# universal
|
# universal
|
||||||
CD_DNS_FILE="/etc/resolv.conf"
|
CD_DNS_FILE="/etc/resolv.conf"
|
||||||
|
@ -583,12 +587,9 @@ CD_STEP = $((CD_STEP+1))
|
||||||
}
|
}
|
||||||
|
|
||||||
cd_switch_to_python () {
|
cd_switch_to_python () {
|
||||||
local path
|
|
||||||
cd_step "Switch to Python"
|
cd_step "Switch to Python"
|
||||||
#
|
|
||||||
path="$(realpath "${0}")"
|
|
||||||
echo "\
|
echo "\
|
||||||
${path}
|
${CD_PATH}
|
||||||
↓
|
↓
|
||||||
${CD_PYTHON_PACKAGES}/${CD_GIT_CHILD}"
|
${CD_PYTHON_PACKAGES}/${CD_GIT_CHILD}"
|
||||||
"${CD_PYTHON_ALIAS}" -m "${CD_GIT_CHILD}" "${@}"
|
"${CD_PYTHON_ALIAS}" -m "${CD_GIT_CHILD}" "${@}"
|
||||||
|
|
Loading…
Reference in a new issue