summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2012-06-16 16:56:42 +0200
committerPierre Schmitz <pierre@archlinux.de>2012-06-16 16:56:42 +0200
commita23d93ce7f124cd14ba6b6d4521c940d9336849b (patch)
treec27c498be1414d61d10fcff3b80b74ea5020b0f2
parent246b8ead603db3c1a8bbc0ae1a0007bda3821c6c (diff)
downloaddevtools-a23d93ce7f124cd14ba6b6d4521c940d9336849b.tar.gz
devtools-a23d93ce7f124cd14ba6b6d4521c940d9336849b.tar.xz
commitpkg: check if there are any packages to process before doing so
-rw-r--r--commitpkg.in20
1 files changed, 11 insertions, 9 deletions
diff --git a/commitpkg.in b/commitpkg.in
index 8b87426..83976bd 100644
--- a/commitpkg.in
+++ b/commitpkg.in
@@ -183,19 +183,21 @@ for _arch in ${arch[@]}; do
commit_arches+=($_arch)
fi
done
-archrelease "${archreleaseopts[@]}" "${commit_arches[@]/#/$repo-}" || die
-new_uploads=()
+if [[ ${#commit_arches[*]} -gt 0 ]]; then
+ archrelease "${archreleaseopts[@]}" "${commit_arches[@]/#/$repo-}" || die
+fi
-# convert to absolute paths so rsync can work with colons (epoch)
-while read -r -d '' upload; do
- new_uploads+=("$upload")
-done < <(realpath -z "${uploads[@]}")
+if [[ ${#uploads[*]} -gt 0 ]]; then
+ new_uploads=()
-uploads=("${new_uploads[@]}")
-unset 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[@]}")
-if [[ ${#uploads[*]} -gt 0 ]]; then
+ uploads=("${new_uploads[@]}")
+ unset new_uploads
msg 'Uploading all package and signature files'
rsync "${rsyncopts[@]}" "${uploads[@]}" "$server:staging/$repo/" || die
fi