From 5708d2aee3fe75c1ab847093e3b4d5e85b069a9e Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Wed, 28 Jan 2015 21:36:07 +0100 Subject: post-receive.cyrax-build: Fix directory handling with new URL. --- post-receive.cyrax-build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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}" -- cgit v1.2.3-1-g7c22