Commit fe2040cd authored by Lukas Fleischer's avatar Lukas Fleischer
Browse files

archrelease: Fix SVN error when repository is empty



If trash is empty, `svn rm -q "${trash[@]}"` fails with:

    svn: Try 'svn help' for more info and then
    svn: Not enough arguments provided

This doesn't result in any further malfunction but is kind of confusing
and unexpected. Skipping `svn rm` on an empty trash fixes this.

Reported-by: default avatarAlexander Rødseth <rodseth@gmail.com>
Signed-off-by: default avatarLukas Fleischer <archlinux@cryptocrack.de>
parent a991c9a7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ for tag in "$@"; do
		while read -r file; do
			trash+=("repos/$tag/$file")
		done < <(svn ls "repos/$tag")
		svn rm -q "${trash[@]}"
		[[ $trash ]] && svn rm -q "${trash[@]}"
	else
		mkdir -p "repos/$tag"
		svn add --parents -q "repos/$tag"