From a5e0340a11854c87ed04bdbec11209a3e9aaae12 Mon Sep 17 00:00:00 2001 From: Long Vu Date: Fri, 7 Jun 2024 16:57:19 -0400 Subject: [PATCH] deploy-data: support rsync src_dir already absolute path --- birdhouse/deployment/deploy-data | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/birdhouse/deployment/deploy-data b/birdhouse/deployment/deploy-data index cc1e8879..525bac4c 100755 --- a/birdhouse/deployment/deploy-data +++ b/birdhouse/deployment/deploy-data @@ -151,6 +151,13 @@ for GIT_REPO_URL in $GIT_REPO_URLS; do echo "sync '$SRC_DIR' to '$DEST_DIR'" DEST_DIR_PARENT="`dirname "$DEST_DIR"`" SRC_DIR_ABS_PATH="`pwd`/$SRC_DIR" + if [ ! -e "$SRC_DIR_ABS_PATH" ]; then + # SRC_DIR could already be absolute. + # Support rsync from source outside of current checkout, from other + # checkouts in same config file because config file can have + # multiple checkouts. + SRC_DIR_ABS_PATH="$SRC_DIR" + fi USER_ID="`id -u`" GROUP_ID="`id -g`" RSYNC_USER_GRP="$USER_ID:$GROUP_ID"