From fe2040cd145344bfbe006e89c79348cce2ad2e13 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Wed, 12 Oct 2011 16:26:29 +0200 Subject: archrelease: Fix SVN error when repository is empty MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Lukas Fleischer --- archrelease.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archrelease.in b/archrelease.in index 7bb4c8a..2f7725e 100644 --- a/archrelease.in +++ b/archrelease.in @@ -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" -- cgit v1.2.3-70-g09d2