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 \