This commit is contained in:
Marc Beninca 2024-06-08 11:56:38 +02:00
parent 1a6241033f
commit 6a93b10cf8
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

22
cd.sh
View file

@ -548,19 +548,17 @@ local url
for repository in "${CD_GIT_CHILD}" "${CD_GIT_PARENT}" ; do for repository in "${CD_GIT_CHILD}" "${CD_GIT_PARENT}" ; do
cd_split cd_split
url="${CD_PROJECTS_URL}/${repository}" url="${CD_PROJECTS_URL}/${repository}"
printf "\ echo "\
${url} ${url}
"
"
git clone \ git clone \
"${url}" "${root}/${repository}" \ "${url}" "${root}/${repository}" \
|| exit || exit
path="${root}/${repository}/${repository}" path="${root}/${repository}/${repository}"
printf "\ echo "\
${path} ${path}
${CD_PYTHON_PACKAGES} ${CD_PYTHON_PACKAGES}"
"
cp --recursive \ cp --recursive \
"${path}" "${CD_PYTHON_PACKAGES}" \ "${path}" "${CD_PYTHON_PACKAGES}" \
|| exit || exit
@ -589,11 +587,10 @@ local path
cd_step "Switch to Python" cd_step "Switch to Python"
# #
path="$(realpath "${0}")" path="$(realpath "${0}")"
printf "\ echo "\
${path} ${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}" "${@}"
} }
@ -709,11 +706,10 @@ cd_split () {
cd_step () { cd_step () {
CD_STEP=$((CD_STEP+1)) CD_STEP=$((CD_STEP+1))
printf "\ echo "\
${CD_DOWN} ${CD_DOWN}
${CD_VERT} ${CD_STEP} ${@} ${CD_VERT} ${CD_STEP} ${@}
${CD___UP} ${CD___UP}"
"
} }
cd_write () { cd_write () {
@ -722,7 +718,7 @@ local text="${2}"
if [ "${file}" ] ; then if [ "${file}" ] ; then
[ -f "${file}" ] && cd_cat "${file}" [ -f "${file}" ] && cd_cat "${file}"
echo "${1}" echo "${1}"
printf "${text}" > "${file}" || exit printf "%s" "${text}" > "${file}" || exit
cd_cat "${file}" cd_cat "${file}"
fi fi
} }