summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-04-01 16:35:34 -0500
committerPierre Schmitz <pierre@archlinux.de>2011-04-02 00:26:33 +0200
commitc955ecf35d34c9121e7709b705d924976ad64923 (patch)
tree40a9774a9446962282298dc658a97882f4192bd2
parent160e936bba6afcd011aabdf49d802843e47959a9 (diff)
commitpkg: upload all files at the same time
Batch them up using a bash array and then pass them all to a single invocation of rsync. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
-rwxr-xr-xcommitpkg11
1 files changed, 8 insertions, 3 deletions
diff --git a/commitpkg b/commitpkg
index 413161c..ed2254c 100755
--- a/commitpkg
+++ b/commitpkg
@@ -112,6 +112,8 @@ else
fi
echo 'done'
+declare -a uploads
+
for _arch in ${arch[@]}; do
for _pkgname in ${pkgname[@]}; do
fullver=$(get_full_version ${epoch:-0} $pkgver $pkgrel)
@@ -126,13 +128,16 @@ for _arch in ${arch[@]}; do
echo "skipping ${_arch}"
continue 2
fi
-
- echo -n 'uploading '
- rsync $rsyncopts "${pkgfile}" "$server:staging/$repo/${pkgfile##*/}" || abort
+ uploads+=("$pkgfile")
done
archrelease $repo-${_arch} || abort
done
+if [[ ${#uploads[*]} -gt 0 ]]; then
+ echo 'uploading all package files'
+ rsync $rsyncopts "${uploads[@]}" "$server:staging/$repo/" || abort
+fi
+
if [ "${arch[*]}" == 'any' ]; then
if [ -d ../repos/$repo-i686 -a -d ../repos/$repo-x86_64 ]; then
pushd ../repos/ >/dev/null