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 <[email protected]>
Signed-off-by: Lukas Fleischer <[email protected]>
---
Pierre: I also pushed a version that is based on the other pending
patches to my "for-pierre" branch.

 archrelease |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/archrelease b/archrelease
index 2f6a563..7073e84 100755
--- a/archrelease
+++ b/archrelease
@@ -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"
-- 
1.7.7

Reply via email to