diff --git a/cd-bootstrap.sh b/bootstrap.sh similarity index 100% rename from cd-bootstrap.sh rename to bootstrap.sh diff --git a/cd.sh b/cd.sh index 583d97d..f04df33 100644 --- a/cd.sh +++ b/cd.sh @@ -5,7 +5,6 @@ PACKAGES=( 'git' ) REPOSITORY='rwx.work/cd' -TARGET='/usr/local/sbin' for nameserver in "${NAMESERVERS[@]}" ; do echo "nameserver ${nameserver}" \ @@ -19,9 +18,10 @@ apt-get update \ apt-get install --yes "${PACKAGES[@]}" \ || exit +DIRECTORY="$(mktemp --directory)" \ +|| exit git clone \ "${GITHUB_SERVER_URL}/${REPOSITORY}" \ -"${TARGET}" \ +"${DIRECTORY}" \ || exit - -cd-bootstrap.sh +"${DIRECTORY}/bootstrap.sh"