[dbscripts,2/2] hoist $tarch handling above $pkgname, since it is more efficient

Message ID 20180702130154.16755-2-eschwartz@archlinux.org
State Accepted
Headers show
Series [dbscripts,1/2] db-move: Don't store filepaths as a string with whitespace splitting | expand

Commit Message

Emil Velikov via arch-projects July 2, 2018, 1:01 p.m. UTC
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
---
 db-move | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Patch

diff --git a/db-move b/db-move
index c4da5bf9..b6448898 100755
--- a/db-move
+++ b/db-move
@@ -95,10 +95,10 @@  for pkgbase in "${args[@]:2}"; do
 			arch_svn rm --force -q "${svnrepo_from}"
 			tag_list+=", $pkgarch"
 
-			for pkgname in "${pkgnames[@]}"; do
-				for tarch in "${tarches[@]}"; do
-					declare -n add_pkgs="add_pkgs_${tarch}"
-					declare -n remove_pkgs="remove_pkgs_${tarch}"
+			for tarch in "${tarches[@]}"; do
+				declare -n add_pkgs="add_pkgs_${tarch}"
+				declare -n remove_pkgs="remove_pkgs_${tarch}"
+				for pkgname in "${pkgnames[@]}"; do
 					pkgpath=$(getpkgfile "${ftppath_from}/${tarch}/${pkgname}-${pkgver}-${pkgarch}"${PKGEXTS})
 					pkgfile="${pkgpath##*/}"