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