spcd/cd.sh

35 lines
595 B
Bash
Raw Normal View History

2024-03-25 11:26:38 +00:00
NAMESERVERS=(
'9.9.9.9'
)
PACKAGES=(
2024-04-08 08:12:58 +00:00
'ca-certificates'
2024-03-25 11:26:38 +00:00
'git'
2024-04-25 08:23:23 +00:00
'python3'
2024-03-25 11:26:38 +00:00
)
REPOSITORY='rwx.work/cd'
for nameserver in "${NAMESERVERS[@]}" ; do
echo "nameserver ${nameserver}" \
>> '/etc/resolv.conf' \
|| exit
done
2024-04-05 15:49:25 +00:00
echo -n "\
APT::Get::Show-Versions True;
2024-04-08 08:07:37 +00:00
APT::Install-Recommends False;
APT::Install-Suggests False;
2024-04-05 15:49:25 +00:00
" > '/etc/apt/apt.conf.d/apt.conf' \
|| exit
2024-03-25 08:02:43 +00:00
apt-get update \
2024-03-25 11:26:38 +00:00
|| exit
apt-get install --yes "${PACKAGES[@]}" \
|| exit
2024-03-25 19:09:04 +00:00
DIRECTORY="$(mktemp --directory)" \
|| exit
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-03-25 19:09:04 +00:00
"${DIRECTORY}/bootstrap.sh"