This commit is contained in:
Marc Beninca 2024-03-25 12:26:38 +01:00
parent 003deb6455
commit 358fd7d687
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

36
cd.sh
View file

@ -1,15 +1,27 @@
echo "\
nameserver 9.9.9.9
" > '/etc/resolv.conf' \
&& \
NAMESERVERS=(
'9.9.9.9'
)
PACKAGES=(
'git'
)
REPOSITORY='rwx.work/cd'
TARGET='/usr/local/sbin'
for nameserver in "${NAMESERVERS[@]}" ; do
echo "nameserver ${nameserver}" \
>> '/etc/resolv.conf' \
|| exit
done
apt-get update \
&& \
apt-get install \
'git' \
--yes \
&& \
|| exit
apt-get install --yes "${PACKAGES[@]}" \
|| exit
git clone \
"${GITHUB_SERVER_URL}/rwx.work/cd" \
'/usr/local/sbin' \
&& \
"${GITHUB_SERVER_URL}/${REPOSITORY}" \
"${TARGET}" \
|| exit
cd-bootstrap.sh