diff --git a/cd.sh b/cd.sh index dbbfd8f..1968ca2 100644 --- a/cd.sh +++ b/cd.sh @@ -1,11 +1,29 @@ #! /usr/bin/env bash -CD_DNS_SERVERS=( -'9.9.9.9' -) CD_NAME='cd' CD_PROJECTS_PARENT='rwx' +function cd_main { + cd_set_environment + cd_write_environment + cd_set_dns_resolving \ + '9.9.9.9' + cd_set_packages_repositories + cd_set_packages_configuration + cd_set_https_verification_off + cd_update_packages_catalog + cd_install_packages_tools + cd_install_ca + cd_set_https_verification_on + cd_update_packages_catalog + cd_upgrade_packages + cd_install_git + cd_install_python + cd_clean_packages_cache + cd_install + cd_bootstrap +} + function cd_set_environment { CD_DNS_FILE='/etc/resolv.conf' CD_ENV="$(mktemp)" @@ -105,7 +123,7 @@ function cd_set_dns_resolving { local server local text='' cd_step "${FUNCNAME}" - for server in "${CD_DNS_SERVERS[@]}" ; do + for server in "${@}" ; do text+="nameserver ${server} " done @@ -253,24 +271,4 @@ function cd_bootstrap { "${CD_PYTHON_COMMAND}" -m "${CD_NAME}" } -function cd_main { - cd_set_environment - cd_write_environment - cd_set_dns_resolving - cd_set_packages_repositories - cd_set_packages_configuration - cd_set_https_verification_off - cd_update_packages_catalog - cd_install_packages_tools - cd_install_ca - cd_set_https_verification_on - cd_update_packages_catalog - cd_upgrade_packages - cd_install_git - cd_install_python - cd_clean_packages_cache - cd_install - cd_bootstrap -} - cd_main