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

28
cd.sh
View file

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