[arch-projects] [devtools][PATCH 6/6] archrelease: declare known_files as an array

Dave Reisner d at falconindy.com
Tue Aug 16 21:36:01 EDT 2011


Signed-off-by: Dave Reisner <dreisner at archlinux.org>
---
 archrelease |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/archrelease b/archrelease
index 24e950c..af75b8f 100755
--- a/archrelease
+++ b/archrelease
@@ -46,13 +46,13 @@ if [[ ! -d "repos/$1" ]]; then
 	mkdir "repos/${1}"
 	svn add -q "repos/${1}"
 fi
-known_files=$(svn ls "trunk")
-for file in $known_files; do
+IFS=$'\n' read -r -d '' -a known_files < <(svn ls "trunk")
+for file in "${known_files[@]}"; do
 	if [[ ${file:(-1)} = '/' ]]; then
 		abort "archrelease: subdirectories are not supported in package directories!"
 	fi
 done
-for file in $known_files; do
+for file in "${known_files[@]}"; do
 	svn copy -q -r HEAD "trunk/$file" "repos/${1}/"
 done
 svn commit -q -m "archrelease: copy trunk to ${1}" || abort
-- 
1.7.6



More information about the arch-projects mailing list