aboutsummaryrefslogtreecommitdiff
path: root/bpkg-rep
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-10-22 22:42:51 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-10-22 22:43:00 +0300
commitfd8ae5aad90dc0cf2ab1a4a8c50deb0fcbac8f70 (patch)
tree3d162b325e7b229c7fa8b7aba8198a15eafd9316 /bpkg-rep
parentdc2bc9ae84a9d74beae7e2e8dd4b9015fdf176ec (diff)
Require bpkg-rep-publish script destination directory to contain 1/ component
Diffstat (limited to 'bpkg-rep')
-rw-r--r--bpkg-rep/publish.in10
1 files changed, 5 insertions, 5 deletions
diff --git a/bpkg-rep/publish.in b/bpkg-rep/publish.in
index 1c2f88d..f3f3ba0 100644
--- a/bpkg-rep/publish.in
+++ b/bpkg-rep/publish.in
@@ -20,10 +20,10 @@
# --destination|-d <host>:<dir>
#
# Remote host and directory to rsync the repository to. Note that the
-# trailing 1/ will be added automatically. In other words, the rsync command
-# will be in the form:
+# directory should include the 1/ component and any sub-directories that may
+# follow. In other words, the rsync command will be in the form:
#
-# rsync ... <dir>/1/ <host>:<dir>/1/
+# rsync ... <dir>/1/ <host>:<dir>/
#
# Repeat this option to specify multiple destinations. In this case, the
# destinations are synced in the order specified with the first failure
@@ -92,7 +92,7 @@ while [ $# -gt 0 ]; do
case $1 in
--destination|-d)
shift
- destinations+=("$1")
+ destinations+=("${1%/}")
shift || true
;;
--timeout)
@@ -320,7 +320,7 @@ for d in "${destinations[@]}"; do
#
run rsync -v -rlptO -c --safe-links --delay-updates --exclude '.*' \
--prune-empty-dirs --delete-after -e "ssh ${ssh_options[*]}" \
-"${rsync_options[@]}" "$repo_dir/$repo_ver/" "$d/$repo_ver/" >&2
+"${rsync_options[@]}" "$repo_dir/$repo_ver/" "$d/" >&2
done