parent
307e0a34ed
commit
3a75085157
1 changed files with 25 additions and 15 deletions
28
cd.sh
28
cd.sh
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue