diff --git a/cd.sh b/cd.sh index 020f5fe..583d97d 100644 --- a/cd.sh +++ b/cd.sh @@ -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