From 358fd7d6874aca412edd23b1ca4b85ba3082bcdf Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 25 Mar 2024 12:26:38 +0100 Subject: [PATCH] vars --- cd.sh | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) 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