Compare commits
No commits in common. "62cd874c26701767622d7cd87358c765ebfb981a" and "b07b446fa59f4cbc065700d8ad0b9e00924e999c" have entirely different histories.
62cd874c26
...
b07b446fa5
1 changed files with 10 additions and 20 deletions
28
cd.sh
28
cd.sh
|
@ -1,5 +1,3 @@
|
|||
#! /usr/bin/env bash
|
||||
|
||||
CD_DNS_SERVERS=(
|
||||
'9.9.9.9'
|
||||
)
|
||||
|
@ -27,7 +25,7 @@ CD_STEP=0
|
|||
|
||||
function cd_step {
|
||||
if [ "${1}" ] ; then
|
||||
((CD_STEP++))
|
||||
CD_STEP=$((CD_STEP+1))
|
||||
echo "
|
||||
↕ ${CD_STEP} ↔ ${1}
|
||||
"
|
||||
|
@ -44,7 +42,7 @@ local text="${2}"
|
|||
fi
|
||||
}
|
||||
|
||||
function cd_set_dns_resolving {
|
||||
function cd_set_dns {
|
||||
local server
|
||||
local text=''
|
||||
cd_step "set name servers"
|
||||
|
@ -56,26 +54,18 @@ local text=''
|
|||
|| exit
|
||||
}
|
||||
|
||||
function cd_set_packages_configuration {
|
||||
function cd_main {
|
||||
cd_set_dns
|
||||
|
||||
cd_step "configure package manager"
|
||||
case "${CD_OS_NAME}" in
|
||||
'debian')
|
||||
cd_write '/etc/apt/apt.conf.d/apt.conf' "\
|
||||
echo -n "\
|
||||
Acquire::Check-Valid-Until True;
|
||||
APT::Get::Show-Versions True;
|
||||
APT::Install-Recommends False;
|
||||
APT::Install-Suggests False;
|
||||
Dir::Etc::SourceParts \"\";
|
||||
"
|
||||
;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
function cd_main {
|
||||
cd_set_dns_resolving
|
||||
cd_set_packages_configuration
|
||||
|
||||
Dir::Etc::SourceParts '';
|
||||
" > '/etc/apt/apt.conf.d/apt.conf' \
|
||||
|| exit
|
||||
cd_step "configure package repositories"
|
||||
echo -n "\
|
||||
deb https://deb.debian.org/debian bookworm main
|
||||
|
|
Loading…
Reference in a new issue