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'
|
'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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue