summaryrefslogtreecommitdiffstats
path: root/commitpkg.in
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2012-01-22 17:20:52 +0100
committerPierre Schmitz <pierre@archlinux.de>2012-02-06 21:15:57 +0100
commit06a681ca3d36b2165d1cc1b58aff26b7abfa0bf4 (patch)
tree25ea1b24ceb54dd65702b45d4e2f0e61f9ff151e /commitpkg.in
parentb763788b163c428652c0c6b1f6e9a1d89aae68e1 (diff)
downloaddevtools-06a681ca3d36b2165d1cc1b58aff26b7abfa0bf4.tar.gz
devtools-06a681ca3d36b2165d1cc1b58aff26b7abfa0bf4.tar.xz
commitpkg: use absolute paths when uploading files
This fixes a problem where rsync won't work if the pkgver contains a colon (epoch). In this case rsync assumes that the colon is a remote:path separator and having src and dest both being remote arguments is not supported. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
Diffstat (limited to 'commitpkg.in')
-rw-r--r--commitpkg.in10
1 files changed, 10 insertions, 0 deletions
diff --git a/commitpkg.in b/commitpkg.in
index bf3a5ab..8139090 100644
--- a/commitpkg.in
+++ b/commitpkg.in
@@ -168,6 +168,16 @@ for _arch in ${arch[@]}; do
done
archrelease "${commit_arches[@]/#/$repo-}" || die
+new_uploads=()
+
+# convert to absolute paths so rsync can work with colons (epoch)
+while read -r -d '' upload; do
+ new_uploads+=("$upload")
+done < <(realpath -z "${uploads[@]}")
+
+uploads=("${new_uploads[@]}")
+unset new_uploads
+
if [[ ${#uploads[*]} -gt 0 ]]; then
msg 'Uploading all package and signature files'
rsync "${rsyncopts[@]}" "${uploads[@]}" "$server:staging/$repo/" || die