install_python_modules
Some checks failed
/ job (push) Failing after 1m3s

This commit is contained in:
Marc Beninca 2024-04-28 23:29:31 +02:00
parent ea2247d3f9
commit 44afb1bf46
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

30
cd.sh
View file

@ -20,7 +20,7 @@ cd_main () {
cd_install_git
cd_install_python
cd_clean_packages_cache
cd_clone_parent_repositories "${@}"
cd_install_python_modules "${@}"
cd_execute_python_module "${@}"
}
@ -244,21 +244,33 @@ cd_clean_packages_cache () {
esac
}
cd_clone_parent_repositories () {
cd_install_python_modules () {
local path
local repository
local root
cd_step "Clone parent repositories"
local url
cd_step "Install Python modules"
root="$(mktemp --directory)" || exit
for repository in "${@}" ; do
echo "${repository}"
url="${CD_PROJECTS_URL}/${repository}"
echo -n "
${url}
"
git clone \
"${CD_PROJECTS_URL}/${repository}" "${root}/${repository}" \
"${url}" "${root}/${repository}" \
|| exit
path="${root}/${repository}/${repository}"
echo -n "\
${path}
${CD_PYTHON_PACKAGES}
"
cp --recursive \
"${root}/${repository}/${repository}" "${CD_PYTHON_PACKAGES}" \
"${path}" "${CD_PYTHON_PACKAGES}" \
|| exit
done
rm --force --recursive "${root}" || exit
cd_rm "${root}"
}
cd_execute_python_module () {
@ -292,9 +304,9 @@ cd_install_package () {
}
cd_rm () {
if [ -f "${1}" ] ; then
if [ -e "${1}" ] ; then
echo "× $(realpath "${1}")"
rm "${1}" || exit
rm --recursive "${1}" || exit
fi
}