[X2Go-Commits] [x2goclient] 49/257: macbuild.sh: use while-read-loop and find to actually recurse through directories.

git-admin at x2go.org git-admin at x2go.org
Mon Nov 28 16:05:07 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 63a2b7a9005c13f21b1c890d033dc32b763eb955
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Thu Jul 30 04:39:59 2015 +0200

    macbuild.sh: use while-read-loop and find to actually recurse through directories.
---
 debian/changelog |    2 ++
 macbuild.sh      |    8 ++++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 3c0b423..6f37ddb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -94,6 +94,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium
     - macbuild.sh: add some more debugging output.
     - macbuild.sh: remove libpulse and libpulsecore from libraries to be
       bundled, as something else will bundle them anyway.
+    - macbuild.sh: use while-read-loop and find to actually recurse through
+      directories.
 
   [ Bernard Cafarelli ]
   * New upstream version (4.0.5.3):
diff --git a/macbuild.sh b/macbuild.sh
index 231e030..cbf9909 100755
--- a/macbuild.sh
+++ b/macbuild.sh
@@ -208,7 +208,11 @@ for cur_lib_or_libdir in ${PULSEAUDIO_LIBRARIES[@]}; do
 		# That's a directory... more work needed here.
 		echo "Scrubbing directory ${cur_lib_or_libdir}"
 		typeset entry=""
-		for entry in "${cur_lib_or_libdir}"/*; do
+
+		# -r parameter to read: Backslashes may NOT escape any characters!
+		# -d '': specifies the delimiter to be used - as '' resolves to an empty string followed
+		#        by a NUL character, the delimiter is set to this very NUL (\000) character.
+		while read -r -d '' entry; do
 			typeset TMP_REGEX='^.*\.(\.[0-9]+){0,2}(so|dylib|bundle)$'
 
 			# This is only here should the PA build system ever break and create
@@ -219,7 +223,7 @@ for cur_lib_or_libdir in ${PULSEAUDIO_LIBRARIES[@]}; do
 				# Filename matched the expected template.
 				PULSEAUDIO_LIBRARIES_FULL+=( "$(lazy_canonical_path "${cur_lib_or_libdir}/${entry}")" )
 			fi
-		done
+		done < <(find "${cur_lib_or_libdir}" -type 'f' -print0)
 	else
 		fail="1"
 		break

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