[X2Go-Commits] [x2goclient] 84/142: deduplicate.sh: fix wrong return value capture.

git-admin at x2go.org git-admin at x2go.org
Thu Jan 14 05:10:25 CET 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 979d0c0afacbdca71523e9249f35c36aea1ff054
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Thu Sep 24 03:39:26 2015 +0200

    deduplicate.sh: fix wrong return value capture.
    
    We want to check the return value of the executed function/command, not
    that of "typeset".
---
 debian/changelog |    2 ++
 deduplicate.sh   |    8 ++++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index a68dee0..02843b3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -164,6 +164,8 @@ x2goclient (4.0.5.1-0x2go1) UNRELEASED; urgency=low
       lazy_canonical_path.
     - deduplicate.sh: remove a bit of noisy debug output, but turn on
       parse_otool_output debugging.
+    - deduplicate.sh: fix wrong return value capture. We want to check the
+      return value of the executed function/command, not that of "typeset".
   * debian/control:
     - Change apache2-dev | libc6-dev build dependency back to apache2-dev
       only. Otherwise, apache2-dev is not installed at all, even though
diff --git a/deduplicate.sh b/deduplicate.sh
index e357529..98f0b26 100755
--- a/deduplicate.sh
+++ b/deduplicate.sh
@@ -170,8 +170,12 @@ done
 for all_entry in "${all_files[@]}"; do
 	typeset otool_out="$(otool -L "${all_entry}")"
 
-	typeset dependencies="$(parse_otool_output "${otool_out}")"
-	echo "parse_otool_output return value: ${?}"
+	# Don't merge the declaration and initialization with the real value assignment.
+	# We need the return value of parse_otool_output(), but running
+	# typeset foo="$(bar)" will give us the return value of typeset, not bar().
+	typeset dependencies=""
+	dependencies="$(parse_otool_output "${otool_out}")"
+
 	if [ "${?}" -eq "0" ]; then
 		typeset line=""
 		while read -r line; do

--
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