veriables

This commit is contained in:
Marc Beninca 2024-04-26 13:38:38 +02:00
parent c99b6dedbc
commit 0c10c4f4ef
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

31
cd.sh
View file

@ -1,14 +1,33 @@
NAMESERVERS=( CD_DNS_SERVERS=(
'9.9.9.9' '9.9.9.9'
) )
REPOSITORY='rwx.work/cd' CD_REPOSITORY='rwx.work/cd'
CD_DNS_FILE='/etc/resolv.conf'
case "${CD_OS_NAME}" in
'debian')
case "${CD_OS_VERSION}" in
'bookworm')
echo 'bookworm!'
;;
*)
echo 'CD_OS_VERSION'
exit 2
;;
esac
;;
*)
echo 'CD_OS_NAME'
exit 1
;;
esac
echo " echo "
1/14 set name servers 1/14 set name servers
" "
for nameserver in "${NAMESERVERS[@]}" ; do for server in "${CD_DNS_SERVERS[@]}" ; do
echo "nameserver ${nameserver}" \ echo "nameserver ${server}" \
>> '/etc/resolv.conf' \ >> "${CD_DNS_FILE}" \
|| exit || exit
done done
@ -80,7 +99,7 @@ echo "
11/14 clone Continuous Delivery 11/14 clone Continuous Delivery
" "
git clone \ git clone \
"${GITHUB_SERVER_URL}/${REPOSITORY}" \ "${GITHUB_SERVER_URL}/${CD_REPOSITORY}" \
"${DIRECTORY}" \ "${DIRECTORY}" \
|| exit || exit