Skip to content

Commit

Permalink
deploy-data: support rsync src_dir already absolute path
Browse files Browse the repository at this point in the history
  • Loading branch information
tlvu committed Jun 7, 2024
1 parent 4c74724 commit a5e0340
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions birdhouse/deployment/deploy-data
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit a5e0340

Please sign in to comment.