[X2Go-Commits] [x2goclient] 69/217: deduplicate.sh: switch to range-based for loop in fixup section for duplicate array walking as we need to access the same element index in the replacement array.

git-admin at x2go.org git-admin at x2go.org
Sat Aug 27 19:24:47 CEST 2016


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch bugfix/osx
in repository x2goclient.

commit a8617ed23153692f822f243d9123ae2f6a041abf
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Thu Aug 27 05:05:07 2015 +0200

    deduplicate.sh: switch to range-based for loop in fixup section for duplicate array walking as we need to access the same element index in the replacement array.
---
 debian/changelog |    3 +++
 deduplicate.sh   |    4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 4e90061..1870fd6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -156,6 +156,9 @@ x2goclient (4.0.5.2-0x2go1) UNRELEASED; urgency=medium
     - deduplicate.sh: debug parse_otool_output fiercely for the time being.
     - deduplicate.sh: prevent word splitting when parsing otool's output. We
       want the raw bits.
+    - deduplicate.sh: switch to range-based for loop in fixup section for
+      duplicate array walking as we need to access the same element index in
+      the replacement array.
   * debian/control:
     - Maintainer change in package: X2Go Developers <x2go-dev at lists.x2go.org>.
     - Uploaders: add myself. Also, force a rebuild due to the changed
diff --git a/deduplicate.sh b/deduplicate.sh
index 93a5c8f..d625590 100755
--- a/deduplicate.sh
+++ b/deduplicate.sh
@@ -154,7 +154,9 @@ for all_entry in "${all_files[@]}"; do
 			typeset dependencies_filename="$(basename "${line}")"
 
 			typeset duplicate_entry=""
-			for duplicate_entry in ${duplicates[@]}; do
+			typeset -i i="0"
+			for i in "${!duplicates[@]}"; do
+				typeset duplicate_entry="${duplicates[${i}]}"
 				typeset duplicate_filename="$(basename "${duplicate_entry}")"
 
 				if [ -n "${dependencies_filename}" ] && [ -n "${duplicate_filename}"]; then

--
Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git


More information about the x2go-commits mailing list