pypkg
Some checks failed
/ job (push) Failing after 7s

This commit is contained in:
Marc Beninca 2024-04-26 20:29:26 +02:00
parent f2e530efc5
commit cc477de841
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

14
cd.sh
View file

@ -10,6 +10,7 @@ CD_REPOSITORY_NAME='cd'
CD_DNS_FILE='/etc/resolv.conf' CD_DNS_FILE='/etc/resolv.conf'
case "${CD_OS_NAME}" in case "${CD_OS_NAME}" in
'debian') 'debian')
CD_PYTHON_PACKAGES='/usr/lib/python3/dist-packages'
case "${CD_OS_VERSION}" in case "${CD_OS_VERSION}" in
'bookworm') 'bookworm')
echo 'TODO' echo 'TODO'
@ -33,7 +34,6 @@ else
echo 'CD_REPOSITORIES_URL' echo 'CD_REPOSITORIES_URL'
exit 3 exit 3
fi fi
CD_STEP=0
function cd_step { function cd_step {
if [ "${1}" ] ; then if [ "${1}" ] ; then
@ -185,20 +185,18 @@ function cd_clean_packages_cache {
function cd_install { function cd_install {
local repository local repository
local root local root
local target
cd_step "${FUNCNAME}" cd_step "${FUNCNAME}"
case "${CD_OS_NAME}" in
'debian') target='/usr/lib/python3/dist-packages' || exit ;;
*) exit 1 ;;
esac
root="$(mktemp --directory)" || exit root="$(mktemp --directory)" || exit
for repository in \ for repository in \
"${CD_REPOSITORIES_PARENT}" \ "${CD_REPOSITORIES_PARENT}" \
"${CD_REPOSITORY_NAME}" \ "${CD_REPOSITORY_NAME}" \
; do ; do
git clone \ git clone \
"${CD_REPOSITORIES_URL}/${repository}" "{root}/${repository}" || exit "${CD_REPOSITORIES_URL}/${repository}" "${root}/${repository}" \
cp --recursive --verbose "${root}/${repository}" "${target}" || exit
cp --recursive --verbose \
"${root}/${repository}" "${CD_PYTHON_PACKAGES}" \
|| exit
# TODO commands # TODO commands
done done
} }