Compare commits
No commits in common. "d7d3aeee39b2742736b5418482443d7d1748ea07" and "52a7cd1d44eed60b82caf960a7d58dafeb67c827" have entirely different histories.
d7d3aeee39
...
52a7cd1d44
2 changed files with 17 additions and 20 deletions
20
cd-init
20
cd-init
|
@ -1,3 +1,9 @@
|
|||
# packages
|
||||
|
||||
apt-get install --yes \
|
||||
'rsync' \
|
||||
'tree' \
|
||||
|
||||
# ssh
|
||||
|
||||
mkdir --parents ~/.ssh
|
||||
|
@ -12,9 +18,13 @@ ssh-ed25519 \
|
|||
AAAAC3NzaC1lZDI1NTE5AAAAIPHCNcgHlQoiNTXfnUZYvHz9OZwYsmBCrSSV7a7Zche5
|
||||
" > ~/.ssh/known_hosts
|
||||
|
||||
# packages
|
||||
# variables
|
||||
|
||||
apt-get install --yes \
|
||||
'python3' \
|
||||
'rsync' \
|
||||
'tree' \
|
||||
export SSH_ID='cd'
|
||||
|
||||
export SSH_URL="\
|
||||
${SSH_ID}@$(basename ${GITHUB_SERVER_URL})\
|
||||
:\
|
||||
/${SSH_ID}/${GITHUB_REF_NAME}/${GITHUB_REPOSITORY}\
|
||||
"
|
||||
echo "${SSH_URL}"
|
||||
|
|
|
@ -1,19 +1,6 @@
|
|||
[ "${1}" ] || exit
|
||||
|
||||
SYNC_HOST="$(basename ${GITHUB_SERVER_URL})"
|
||||
SYNC_SOURCE="${1}"
|
||||
SYNC_USER='cd'
|
||||
|
||||
SYNC_ROOT="/${SYNC_USER}/${GITHUB_REF_NAME}/${GITHUB_REPOSITORY}"
|
||||
|
||||
SYNC_TARGET="${SYNC_USER}@${SYNC_HOST}:${SYNC_ROOT}"
|
||||
if [ "${2}" ] ; then
|
||||
SYNC_TARGET="${SYNC_TARGET}/${2}"
|
||||
fi
|
||||
|
||||
#rsync \
|
||||
#--archive \
|
||||
#--delete-before \
|
||||
#--verbose \
|
||||
echo "${SYNC_SOURCE}/"
|
||||
echo "${SYNC_TARGET}/"
|
||||
#'out/' \
|
||||
echo "${SSH_URL}/"
|
||||
|
|
Loading…
Reference in a new issue