Compare commits

..

No commits in common. "b88d8caa226d757a6589cd7e73ec86f126413cc8" and "8004d78a367098a8878b26dd7b2882a5f5534c11" have entirely different histories.

58
cd.sh
View file

@ -23,7 +23,7 @@ case "${CD_OS_NAME}" in
esac
CD_STEP=0
function cd_step {
function step {
if [ "${1}" ] ; then
((CD_STEP++))
echo "
@ -32,29 +32,14 @@ function cd_step {
fi
}
function cd_write {
local file="${1}"
local text="${2}"
if [ "${file}" ] ; then
echo -n "${text}" \
> "${file}" \
|| exit
fi
}
function cd_set_dns {
local server
local text=''
cd_step "set name servers"
step "set name servers"
for server in "${CD_DNS_SERVERS[@]}" ; do
text+="nameserver ${server}
"
done
cd_write "${CD_DNS_FILE}" "${text}" \
echo "nameserver ${server}" \
>> "${CD_DNS_FILE}" \
|| exit
}
done
cd_step "configure package manager"
step "configure package manager"
echo -n "\
Acquire::Check-Valid-Until True;
APT::Get::Show-Versions True;
@ -63,7 +48,7 @@ APT::Install-Suggests False;
Dir::Etc::SourceParts '';
" > '/etc/apt/apt.conf.d/apt.conf' \
|| exit
cd_step "configure package repositories"
step "configure package repositories"
echo -n "\
deb https://deb.debian.org/debian bookworm main
deb https://deb.debian.org/debian bookworm-backports main
@ -72,52 +57,45 @@ deb https://deb.debian.org/debian-security bookworm-security main
" > '/etc/apt/sources.list' \
|| exit
cd_step "disable package verification"
step "disable package verification"
echo -n "\
Acquire::https::Verify-Peer False;
" > '/etc/apt/apt.conf.d/https' \
|| exit
cd_step "update package catalog"
step "update package catalog"
apt-get update \
|| exit
cd_step "install CA certificates package"
step "install CA certificates package"
apt-get install --yes 'ca-certificates' \
|| exit
cd_step "enable package verification"
step "enable package verification"
rm '/etc/apt/apt.conf.d/https' \
|| exit
cd_step "update package catalog"
step "update package catalog"
apt-get update \
|| exit
cd_step "upgrade packages"
step "upgrade packages"
apt-get upgrade --yes \
|| exit
cd_step "install Git"
step "install Git"
apt-get install --yes 'git' \
|| exit
DIRECTORY="$(mktemp --directory)" \
|| exit
cd_step "clone Continuous Delivery"
step "clone Continuous Delivery"
git clone \
"${GITHUB_SERVER_URL}/${CD_REPOSITORY}" \
"${DIRECTORY}" \
|| exit
cd_step "install Python"
step "install Python"
apt-get install --yes 'python3' \
|| exit
cd_step "clean package cache"
step "clean package cache"
apt-get clean \
|| exit
cd_step "bootstrap"
step "bootstrap"
"${DIRECTORY}/bootstrap.sh"
function cd_main {
cd_set_dns
}
cd_main