From fd8ae5aad90dc0cf2ab1a4a8c50deb0fcbac8f70 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 22 Oct 2018 22:42:51 +0300 Subject: Require bpkg-rep-publish script destination directory to contain 1/ component --- bpkg-rep/publish.in | 10 +++++----- 1 file 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 : # # 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 ... /1/ :/1/ +# rsync ... /1/ :/ # # 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 -- cgit v1.1