sync/checks
This commit is contained in:
parent
d7d3aeee39
commit
c5be132b42
1 changed files with 11 additions and 7 deletions
|
@ -1,15 +1,19 @@
|
||||||
[ "${1}" ] || exit
|
[ "${1}" ] && SYNC_SOURCE="${1}" || exit
|
||||||
|
|
||||||
SYNC_HOST="$(basename ${GITHUB_SERVER_URL})"
|
|
||||||
SYNC_SOURCE="${1}"
|
|
||||||
SYNC_USER='cd'
|
SYNC_USER='cd'
|
||||||
|
|
||||||
SYNC_ROOT="/${SYNC_USER}/${GITHUB_REF_NAME}/${GITHUB_REPOSITORY}"
|
[ "${GITHUB_SERVER_URL}" ] \
|
||||||
|
&& SYNC_HOST="$(basename ${GITHUB_SERVER_URL})" || exit
|
||||||
|
|
||||||
|
[ "${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}"
|
SYNC_TARGET="${SYNC_USER}@${SYNC_HOST}:${SYNC_ROOT}"
|
||||||
if [ "${2}" ] ; then
|
[ "${2}" ] && SYNC_TARGET="${SYNC_TARGET}/${2}"
|
||||||
SYNC_TARGET="${SYNC_TARGET}/${2}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#rsync \
|
#rsync \
|
||||||
#--archive \
|
#--archive \
|
||||||
|
|
Loading…
Reference in a new issue