spcd/cd-synchronize-output

20 lines
383 B
Text
Raw Normal View History

2024-03-23 11:20:52 +00:00
[ "${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
2024-03-23 09:14:22 +00:00
#rsync \
#--archive \
#--delete-before \
#--verbose \
2024-03-23 11:20:52 +00:00
echo "${SYNC_SOURCE}/"
echo "${SYNC_TARGET}/"