[arch-projects] [devtools] [PATCH] archrelease: Fix SVN error when repository is empty

Lukas Fleischer archlinux at cryptocrack.de
Wed Oct 12 10:52:41 EDT 2011

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 at gmail.com>
Signed-off-by: Lukas Fleischer <archlinux at cryptocrack.de>
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
 		done < <(svn ls "repos/$tag")
-		svn rm -q "${trash[@]}"
+		[[ $trash ]] && svn rm -q "${trash[@]}"
 		mkdir -p "repos/$tag"
 		svn add --parents -q "repos/$tag"

More information about the arch-projects mailing list