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: Alexander Rødseth <rodseth@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2011-10-12 16:26:29 +02:00
parent a991c9a71f
commit fe2040cd14
1 changed files with 1 additions and 1 deletions

View File

@ -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"