spcd/cd.sh
Marc Beninca 01e0e212d4
All checks were successful
/ job (push) Successful in 1m20s
versions
2024-04-05 17:49:25 +02:00

30 lines
507 B
Bash

NAMESERVERS=(
'9.9.9.9'
)
PACKAGES=(
'git'
)
REPOSITORY='rwx.work/cd'
for nameserver in "${NAMESERVERS[@]}" ; do
echo "nameserver ${nameserver}" \
>> '/etc/resolv.conf' \
|| exit
done
echo -n "\
APT::Get::Show-Versions True;
" > '/etc/apt/apt.conf.d/apt.conf' \
|| exit
apt-get update \
|| exit
apt-get install --yes "${PACKAGES[@]}" \
|| exit
DIRECTORY="$(mktemp --directory)" \
|| exit
git clone \
"${GITHUB_SERVER_URL}/${REPOSITORY}" \
"${DIRECTORY}" \
|| exit
"${DIRECTORY}/bootstrap.sh"