git,python
Some checks failed
/ job (push) Failing after 3s

This commit is contained in:
Marc Beninca 2024-04-26 16:50:25 +02:00
parent 307e0a34ed
commit 3a75085157
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

32
cd.sh
View file

@ -107,19 +107,34 @@ function cd_update_packages_catalog {
} }
function cd_install_package { function cd_install_package {
if [ "${1}" ] ; then if [ "${1}" ] ; then
cd_step "${FUNCNAME}"
case "${CD_OS_NAME}" in case "${CD_OS_NAME}" in
'debian') apt-get install --yes "${1}" || exit ;; 'debian') apt-get install --yes "${1}" || exit ;;
*) exit 1 ;; *) exit 1 ;;
esac esac
fi fi
} }
function cd_install_ca { function cd_install_ca {
cd_step "${FUNCNAME}" cd_step "${FUNCNAME}"
case "${CD_OS_NAME}" in case "${CD_OS_NAME}" in
'debian') apt-get install --yes 'ca-certificates' || exit ;; 'debian') cd_install_package 'ca-certificates' ;;
*) exit 1 ;;
esac
}
function cd_install_git {
cd_step "${FUNCNAME}"
case "${CD_OS_NAME}" in
'debian') cd_install_package 'git' ;;
*) exit 1 ;;
esac
}
function cd_install_python {
cd_step "${FUNCNAME}"
case "${CD_OS_NAME}" in
'debian') cd_install_package 'python3' ;;
*) exit 1 ;; *) exit 1 ;;
esac esac
} }
@ -150,10 +165,8 @@ function cd_main {
cd_set_https_verification_on cd_set_https_verification_on
cd_update_packages_catalog cd_update_packages_catalog
cd_upgrade_packages cd_upgrade_packages
cd_install_git
cd_step "install Git" cd_install_python
apt-get install --yes 'git' \
|| exit
DIRECTORY="$(mktemp --directory)" \ DIRECTORY="$(mktemp --directory)" \
|| exit || exit
@ -163,9 +176,6 @@ git clone \
"${DIRECTORY}" \ "${DIRECTORY}" \
|| exit || exit
cd_step "install Python"
apt-get install --yes 'python3' \
|| exit
cd_step "clean package cache" cd_step "clean package cache"
apt-get clean \ apt-get clean \
|| exit || exit