diff options
author | Alexander Sulfrian <alex@spline.inf.fu-berlin.de> | 2015-01-28 21:36:07 +0100 |
---|---|---|
committer | wartung <wartung@vm-staticweb.spline.inf.fu-berlin.de> | 2015-01-28 21:36:07 +0100 |
commit | 5708d2aee3fe75c1ab847093e3b4d5e85b069a9e (patch) | |
tree | d4159ebec53023b410217a4fb682e6eb29d09bcc | |
parent | 908673589119585ee7ee94531e77d9bc9738fd6a (diff) | |
download | hooks-5708d2aee3fe75c1ab847093e3b4d5e85b069a9e.tar.gz hooks-5708d2aee3fe75c1ab847093e3b4d5e85b069a9e.tar.bz2 hooks-5708d2aee3fe75c1ab847093e3b4d5e85b069a9e.zip |
post-receive.cyrax-build: Fix directory handling with new URL.
-rwxr-xr-x | post-receive.cyrax-build | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/post-receive.cyrax-build b/post-receive.cyrax-build index af16c05..53c5608 100755 --- a/post-receive.cyrax-build +++ b/post-receive.cyrax-build @@ -9,10 +9,12 @@ while read old new ref ; do TARGET_DIR="${WEB_BASE}/www.spline.de/htdocs/" URL="https://www.spline.de/" RELATIVE="" + TMP_DIR_RELATIVE="" else TARGET_DIR="${WEB_BASE}/branches.spline.de/htdocs/" URL="https://spline.de/_branch/${BRANCH}/" RELATIVE="${BRANCH}" + TMP_DIR_RELATIVE="_branch/${RELATIVE}" if [ "${new}" = "0000000000000000000000000000000000000000" ]; then rm -rf "${TARGET_DIR}/${BRANCH}/" @@ -34,7 +36,7 @@ while read old new ref ; do mkdir -p "${TARGET_DIR}/${RELATIVE}/" rm -rf "${TARGET_DIR}/${RELATIVE}/" - mv "${TARGET_TMP_DIR}/_branch/${RELATIVE}/" "${TARGET_DIR}/${RELATIVE}/" + mv "${TARGET_TMP_DIR}/${TMP_DIR_RELATIVE}/" "${TARGET_DIR}/${RELATIVE}/" rm -rf "${TMP_DIR}" rm -rf "${TARGET_TMP_DIR}" |