Compare commits

..

No commits in common. "c5be132b42456fe35a584b14b8192a05a02c4b30" and "a9d8bedc8137d9e0634f94867cbceb3be63fdaf7" have entirely different histories.

2 changed files with 20 additions and 28 deletions

19
cd-init
View file

@ -1,3 +1,9 @@
# packages
apt-get install --yes \
'rsync' \
'tree' \
# ssh # ssh
mkdir --parents ~/.ssh mkdir --parents ~/.ssh
@ -12,9 +18,12 @@ ssh-ed25519 \
AAAAC3NzaC1lZDI1NTE5AAAAIPHCNcgHlQoiNTXfnUZYvHz9OZwYsmBCrSSV7a7Zche5 AAAAC3NzaC1lZDI1NTE5AAAAIPHCNcgHlQoiNTXfnUZYvHz9OZwYsmBCrSSV7a7Zche5
" > ~/.ssh/known_hosts " > ~/.ssh/known_hosts
# packages # variables
apt-get install --yes \ export SSH_ID='cd'
'python3' \
'rsync' \ export SSH_URL="\
'tree' \ ${SSH_ID}@$(basename ${GITHUB_SERVER_URL})\
:\
/${SSH_ID}/${GITHUB_REF_NAME}/${GITHUB_REPOSITORY}\
"

View file

@ -1,23 +1,6 @@
[ "${1}" ] && SYNC_SOURCE="${1}" || exit rsync \
--archive \
SYNC_USER='cd' --delete-before \
--verbose \
[ "${GITHUB_SERVER_URL}" ] \ 'out/' \
&& SYNC_HOST="$(basename ${GITHUB_SERVER_URL})" || exit "${SSH_URL}/"
[ "${SYNC_USER}" ] \
&& SYNC_ROOT="/${SYNC_USER}" || exit
[ "${GITHUB_REF_NAME}" ] \
&& SYNC_ROOT="${SYNC_ROOT}/${GITHUB_REF_NAME}" || exit
[ "${GITHUB_REPOSITORY}" ] \
&& SYNC_ROOT="${SYNC_ROOT}/${GITHUB_REPOSITORY}" || exit
SYNC_TARGET="${SYNC_USER}@${SYNC_HOST}:${SYNC_ROOT}"
[ "${2}" ] && SYNC_TARGET="${SYNC_TARGET}/${2}"
#rsync \
#--archive \
#--delete-before \
#--verbose \
echo "${SYNC_SOURCE}/"
echo "${SYNC_TARGET}/"