Compare commits

..

8 commits

Author SHA1 Message Date
10280bcdd9
useless 2024-03-25 20:58:03 +01:00
ad00afc4cc
.sh 2024-03-25 20:52:27 +01:00
71cd517840
cmd 2024-03-25 20:49:12 +01:00
c1aad03c68
bootstrap 2024-03-25 20:09:04 +01:00
ee1357194b
.sh 2024-03-25 20:04:31 +01:00
7248db6bca
remove 2024-03-25 20:03:02 +01:00
6890791909
mv 2024-03-25 20:01:32 +01:00
e1607151ee
commands 2024-03-25 19:59:12 +01:00
10 changed files with 23 additions and 7 deletions

View file

@ -1,3 +1,7 @@
FILE="$(realpath "${BASH_SOURCE[0]}")"
ROOT="$(dirname "${FILE}")"
COMMANDS='cmd'
KEY_ALGORITHM='ed25519' KEY_ALGORITHM='ed25519'
KEY_DIRECTORY='.ssh' KEY_DIRECTORY='.ssh'
KEY_PATH="${KEY_DIRECTORY}/id_${KEY_ALGORITHM}" KEY_PATH="${KEY_DIRECTORY}/id_${KEY_ALGORITHM}"
@ -8,6 +12,15 @@ PACKAGES=(
'tree' 'tree'
) )
SERVER="$(basename ${GITHUB_SERVER_URL})" SERVER="$(basename ${GITHUB_SERVER_URL})"
TARGET='/usr/local/sbin'
# commands
cd "${ROOT}/${COMMANDS}" \
|| exit
for file in *.sh ; do
cp "${file}" "${TARGET}/${file%.sh}" \
|| exit
done
# ssh # ssh
cd \ cd \
@ -24,4 +37,8 @@ echo "${SERVER} ssh-${KEY_ALGORITHM} ${KEY_PUBLIC}" \
|| exit || exit
# packages # packages
apt-get install --yes "${PACKAGES[@]}" apt-get install --yes "${PACKAGES[@]}" \
|| exit
# remove
rm --force --recursive "${ROOT}"

View file

@ -1,2 +0,0 @@
unset TOP_SECRET
env | sort

8
cd.sh
View file

@ -5,7 +5,6 @@ PACKAGES=(
'git' 'git'
) )
REPOSITORY='rwx.work/cd' REPOSITORY='rwx.work/cd'
TARGET='/usr/local/sbin'
for nameserver in "${NAMESERVERS[@]}" ; do for nameserver in "${NAMESERVERS[@]}" ; do
echo "nameserver ${nameserver}" \ echo "nameserver ${nameserver}" \
@ -19,9 +18,10 @@ apt-get update \
apt-get install --yes "${PACKAGES[@]}" \ apt-get install --yes "${PACKAGES[@]}" \
|| exit || exit
DIRECTORY="$(mktemp --directory)" \
|| exit
git clone \ git clone \
"${GITHUB_SERVER_URL}/${REPOSITORY}" \ "${GITHUB_SERVER_URL}/${REPOSITORY}" \
"${TARGET}" \ "${DIRECTORY}" \
|| exit || exit
"${DIRECTORY}/bootstrap.sh"
cd-bootstrap.sh

1
cmd/cd-list-environment.sh Executable file
View file

@ -0,0 +1 @@
env | sort