parent
fedeec960d
commit
12d8ae4269
1 changed files with 22 additions and 24 deletions
46
cd.sh
46
cd.sh
|
@ -1,11 +1,29 @@
|
||||||
#! /usr/bin/env bash
|
#! /usr/bin/env bash
|
||||||
|
|
||||||
CD_DNS_SERVERS=(
|
|
||||||
'9.9.9.9'
|
|
||||||
)
|
|
||||||
CD_NAME='cd'
|
CD_NAME='cd'
|
||||||
CD_PROJECTS_PARENT='rwx'
|
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 {
|
function cd_set_environment {
|
||||||
CD_DNS_FILE='/etc/resolv.conf'
|
CD_DNS_FILE='/etc/resolv.conf'
|
||||||
CD_ENV="$(mktemp)"
|
CD_ENV="$(mktemp)"
|
||||||
|
@ -105,7 +123,7 @@ function cd_set_dns_resolving {
|
||||||
local server
|
local server
|
||||||
local text=''
|
local text=''
|
||||||
cd_step "${FUNCNAME}"
|
cd_step "${FUNCNAME}"
|
||||||
for server in "${CD_DNS_SERVERS[@]}" ; do
|
for server in "${@}" ; do
|
||||||
text+="nameserver ${server}
|
text+="nameserver ${server}
|
||||||
"
|
"
|
||||||
done
|
done
|
||||||
|
@ -253,24 +271,4 @@ function cd_bootstrap {
|
||||||
"${CD_PYTHON_COMMAND}" -m "${CD_NAME}"
|
"${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
|
cd_main
|
||||||
|
|
Loading…
Reference in a new issue