From e1607151ee1d7b20bfca5bc9d8284f2ce93d31b2 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 25 Mar 2024 19:59:12 +0100 Subject: [PATCH] commands --- cd-bootstrap.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cd-bootstrap.sh b/cd-bootstrap.sh index dbab7b6..310546c 100755 --- a/cd-bootstrap.sh +++ b/cd-bootstrap.sh @@ -1,3 +1,7 @@ +FILE="$(realpath "${BASH_SOURCE[0]}")" +NAME="$(basename "${GITHUB_REPOSITORY}")" +ROOT="$(dirname "${FILE}")" + KEY_ALGORITHM='ed25519' KEY_DIRECTORY='.ssh' KEY_PATH="${KEY_DIRECTORY}/id_${KEY_ALGORITHM}" @@ -8,6 +12,15 @@ PACKAGES=( 'tree' ) SERVER="$(basename ${GITHUB_SERVER_URL})" +TARGET='/usr/local/sbin' + +# commands +cd "${ROOT}/${NAME}" \ +|| exit +for file in *.sh ; do + cp "${file}" "${TARGET}" \ + || exit +done # ssh cd \