[X2Go-Commits] [x2goclient] 58/280: deduplicate.sh: new function for parsing otool's output and printing library dependencies if no error occurred.
git-admin at x2go.org
git-admin at x2go.org
Wed Jan 18 12:25:05 CET 2017
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch bugfix/osx
in repository x2goclient.
commit c78f27d55fe08d0d44bf2e391a1f78d9dd07142a
Author: Mihai Moldovan <ionic at ionic.de>
Date: Wed Aug 26 22:28:09 2015 +0200
deduplicate.sh: new function for parsing otool's output and printing library dependencies if no error occurred.
---
debian/changelog | 2 ++
deduplicate.sh | 27 +++++++++++++++++++++++++++
2 files changed, 29 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 6c8832c..b77c1a9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -133,6 +133,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium
Progress file deduplication script.
- deduplicate.sh: add duplicates-to-real mapping.
- deduplicate.sh: add missed local variable declaration.
+ - deduplicate.sh: new function for parsing otool's output and printing
+ library dependencies if no error occurred.
[ Bernard Cafarelli ]
* New upstream version (4.0.5.3):
diff --git a/deduplicate.sh b/deduplicate.sh
index 30fd3ad..a5b59e9 100755
--- a/deduplicate.sh
+++ b/deduplicate.sh
@@ -6,6 +6,33 @@ base_dir="${1:?"No base dir given."}"
typeset -a special_files_regex
special_files_regex+=( "pulseaudio/libpulsecommon-[0-9]\.[0-9]\.dylib" )
+typeset -a otool_fail_str
+otool_fail_str=( "is not an object file"
+ "can't open file"
+ "Archive : " )
+
+parse_otool_output() {
+ typeset raw_output="${@}"
+
+ typeset fail_str=""
+ for fail_str in ${otool_fail_str}; do
+ if ! echo "${raw_output}" | grep -q "${fail_str}"; then
+ exit 1
+ fi
+ done
+
+ typeset tmp_regex='^[[:space:]]+(.*)[[:space:]]\(compatibility version .*, current version .*\)'
+
+ typeset line=""
+ while read -r line; do
+ if [[ "${line}" =~ ${tmp_regex} ]]; then
+ echo "${BASH_REMATCH[1]}"
+ fi
+ done <<< "${raw_output}"
+
+ exit 0
+}
+
typeset -a all_files
typeset entry=""
while read -r -d '' entry; 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