veriables
This commit is contained in:
parent
c99b6dedbc
commit
0c10c4f4ef
1 changed files with 25 additions and 6 deletions
31
cd.sh
31
cd.sh
|
@ -1,14 +1,33 @@
|
|||
NAMESERVERS=(
|
||||
CD_DNS_SERVERS=(
|
||||
'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 "
|
||||
1/14 set name servers
|
||||
"
|
||||
for nameserver in "${NAMESERVERS[@]}" ; do
|
||||
echo "nameserver ${nameserver}" \
|
||||
>> '/etc/resolv.conf' \
|
||||
for server in "${CD_DNS_SERVERS[@]}" ; do
|
||||
echo "nameserver ${server}" \
|
||||
>> "${CD_DNS_FILE}" \
|
||||
|| exit
|
||||
done
|
||||
|
||||
|
@ -80,7 +99,7 @@ echo "
|
|||
11/14 clone Continuous Delivery
|
||||
"
|
||||
git clone \
|
||||
"${GITHUB_SERVER_URL}/${REPOSITORY}" \
|
||||
"${GITHUB_SERVER_URL}/${CD_REPOSITORY}" \
|
||||
"${DIRECTORY}" \
|
||||
|| exit
|
||||
|
||||
|
|
Loading…
Reference in a new issue