[arch-projects] [devtools][PATCH 4/6] archrelease: call svn rm only once

Dave Reisner d at falconindy.com
Tue Aug 16 21:35:59 EDT 2011


Signed-off-by: Dave Reisner <dreisner at archlinux.org>
---
I'll cut the person who wants to commit an odd filename to svn (e.g. something
with whitespaces), but archrelease shouldn't care about this.

 archrelease |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/archrelease b/archrelease
index 8da8b95..20ccd50 100755
--- a/archrelease
+++ b/archrelease
@@ -30,9 +30,11 @@ fi
 echo -n "releasing package to ${1}..."
 pushd .. >/dev/null
 if [ -d "repos/${1}" ]; then
-	for file in $(svn ls "repos/${1}"); do
-		svn rm -q "repos/${1}/$file"
-	done
+	declare -a trash
+	while read -r file; do
+		trash+=("repos/$1/$file")
+	done < <(svn ls "repos/$1")
+	svn rm -q "${trash[@]}"
 fi
 if [ ! -d repos ]; then
 	mkdir repos
-- 
1.7.6



More information about the arch-projects mailing list