spcd/cd-init
2024-03-23 10:18:10 +01:00

30 lines
509 B
Text
Executable file

# packages
apt-get install --yes \
'rsync' \
'tree' \
# ssh
mkdir --parents ~/.ssh
echo "${CD}" > ~/.ssh/id_ed25519
unset CD
chmod 400 ~/.ssh/id_ed25519
echo -n "\
|1|BcccCTMLpM9HHSgJmPu/FFOwOv0=|+3BKK02xibpCPxQ9Nghi2GbXLng= \
ssh-ed25519 \
AAAAC3NzaC1lZDI1NTE5AAAAIPHCNcgHlQoiNTXfnUZYvHz9OZwYsmBCrSSV7a7Zche5
" > ~/.ssh/known_hosts
# variables
export SSH_ID='cd'
export SSH_URL="\
${SSH_ID}@$(basename ${GITHUB_SERVER_URL})\
:\
/${SSH_ID}/${GITHUB_REF_NAME}/${GITHUB_REPOSITORY}\
"
echo "${SSH_URL}"