2024-03-25 11:26:38 +00:00
|
|
|
NAMESERVERS=(
|
|
|
|
'9.9.9.9'
|
|
|
|
)
|
|
|
|
REPOSITORY='rwx.work/cd'
|
|
|
|
|
2024-04-25 14:01:18 +00:00
|
|
|
echo "
|
2024-04-25 13:38:28 +00:00
|
|
|
1/12 set name servers
|
2024-04-25 14:01:18 +00:00
|
|
|
"
|
2024-03-25 11:26:38 +00:00
|
|
|
for nameserver in "${NAMESERVERS[@]}" ; do
|
|
|
|
echo "nameserver ${nameserver}" \
|
|
|
|
>> '/etc/resolv.conf' \
|
|
|
|
|| exit
|
|
|
|
done
|
|
|
|
|
2024-04-25 14:01:18 +00:00
|
|
|
echo "
|
2024-04-25 13:38:28 +00:00
|
|
|
2/12 configure package manager
|
2024-04-25 14:01:18 +00:00
|
|
|
"
|
2024-04-05 15:49:25 +00:00
|
|
|
echo -n "\
|
2024-04-25 13:33:58 +00:00
|
|
|
Acquire::Check-Valid-Until True;
|
2024-04-05 15:49:25 +00:00
|
|
|
APT::Get::Show-Versions True;
|
2024-04-08 08:07:37 +00:00
|
|
|
APT::Install-Recommends False;
|
|
|
|
APT::Install-Suggests False;
|
2024-04-25 13:33:58 +00:00
|
|
|
Dir::Etc::SourceParts '';
|
2024-04-05 15:49:25 +00:00
|
|
|
" > '/etc/apt/apt.conf.d/apt.conf' \
|
|
|
|
|| exit
|
2024-04-25 14:01:18 +00:00
|
|
|
echo "
|
2024-04-25 13:38:28 +00:00
|
|
|
3/12 configure package repositories
|
2024-04-25 14:01:18 +00:00
|
|
|
"
|
2024-04-25 13:30:32 +00:00
|
|
|
echo -n "\
|
|
|
|
deb https://deb.debian.org/debian bookworm main
|
2024-04-25 13:33:58 +00:00
|
|
|
deb https://deb.debian.org/debian bookworm-backports main
|
|
|
|
deb https://deb.debian.org/debian bookworm-updates main
|
2024-04-25 13:30:32 +00:00
|
|
|
deb https://deb.debian.org/debian-security bookworm-security main
|
|
|
|
" > '/etc/apt/sources.list' \
|
|
|
|
|| exit
|
|
|
|
|
2024-04-25 14:01:18 +00:00
|
|
|
echo "
|
2024-04-25 13:38:28 +00:00
|
|
|
4/12 update package catalog
|
2024-04-25 14:01:18 +00:00
|
|
|
"
|
2024-04-25 13:30:32 +00:00
|
|
|
apt-get update \
|
|
|
|
|| exit
|
2024-04-25 14:01:18 +00:00
|
|
|
echo "
|
2024-04-25 13:38:28 +00:00
|
|
|
5/12 install CA certificates package
|
2024-04-25 14:01:18 +00:00
|
|
|
"
|
2024-04-25 13:30:32 +00:00
|
|
|
apt-get install --yes 'ca-certificates' \
|
|
|
|
|| exit
|
2024-04-25 14:01:18 +00:00
|
|
|
echo "
|
2024-04-25 13:38:28 +00:00
|
|
|
6/12 update package catalog
|
2024-04-25 14:01:18 +00:00
|
|
|
"
|
2024-03-25 08:02:43 +00:00
|
|
|
apt-get update \
|
2024-03-25 11:26:38 +00:00
|
|
|
|| exit
|
2024-04-25 14:01:18 +00:00
|
|
|
echo "
|
2024-04-25 13:38:28 +00:00
|
|
|
7/12 upgrade packages
|
2024-04-25 14:01:18 +00:00
|
|
|
"
|
2024-04-25 13:30:32 +00:00
|
|
|
apt-get upgrade --yes \
|
|
|
|
|| exit
|
|
|
|
|
2024-04-25 14:01:18 +00:00
|
|
|
echo "
|
2024-04-25 13:38:28 +00:00
|
|
|
8/12 install Git
|
2024-04-25 14:01:18 +00:00
|
|
|
"
|
2024-04-25 13:30:32 +00:00
|
|
|
apt-get install --yes 'git' \
|
2024-03-25 11:26:38 +00:00
|
|
|
|| exit
|
|
|
|
|
2024-03-25 19:09:04 +00:00
|
|
|
DIRECTORY="$(mktemp --directory)" \
|
|
|
|
|| exit
|
2024-04-25 14:01:18 +00:00
|
|
|
echo "
|
2024-04-25 13:38:28 +00:00
|
|
|
9/12 clone Continuous Delivery
|
2024-04-25 14:01:18 +00:00
|
|
|
"
|
2024-03-25 08:02:43 +00:00
|
|
|
git clone \
|
2024-03-25 11:26:38 +00:00
|
|
|
"${GITHUB_SERVER_URL}/${REPOSITORY}" \
|
2024-03-25 19:09:04 +00:00
|
|
|
"${DIRECTORY}" \
|
2024-03-25 11:26:38 +00:00
|
|
|
|| exit
|
2024-04-25 13:30:32 +00:00
|
|
|
|
2024-04-25 14:01:18 +00:00
|
|
|
echo "
|
2024-04-25 13:38:28 +00:00
|
|
|
10/12 install Python
|
2024-04-25 14:01:18 +00:00
|
|
|
"
|
2024-04-25 13:30:32 +00:00
|
|
|
apt-get install --yes 'python3' \
|
|
|
|
|| exit
|
2024-04-25 14:01:18 +00:00
|
|
|
echo "
|
2024-04-25 13:38:28 +00:00
|
|
|
11/12 clean package cache
|
2024-04-25 14:01:18 +00:00
|
|
|
"
|
2024-04-25 13:38:28 +00:00
|
|
|
apt-get clean \
|
|
|
|
|| exit
|
2024-04-25 14:01:18 +00:00
|
|
|
echo "
|
2024-04-25 13:38:28 +00:00
|
|
|
12/12 bootstrap
|
2024-04-25 14:01:18 +00:00
|
|
|
"
|
2024-03-25 19:09:04 +00:00
|
|
|
"${DIRECTORY}/bootstrap.sh"
|