Commit a23d93ce authored by Pierre Schmitz's avatar Pierre Schmitz
Browse files

commitpkg: check if there are any packages to process before doing so

parent 246b8ead
Loading
Loading
Loading
Loading
+11 −9
Original line number Diff line number Diff line
@@ -183,8 +183,12 @@ for _arch in ${arch[@]}; do
		commit_arches+=($_arch)
	fi
done

if [[ ${#commit_arches[*]} -gt 0 ]]; then
	archrelease "${archreleaseopts[@]}" "${commit_arches[@]/#/$repo-}" || die
fi

if [[ ${#uploads[*]} -gt 0 ]]; then
	new_uploads=()

	# convert to absolute paths so rsync can work with colons (epoch)
@@ -194,8 +198,6 @@ 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
fi