[X2Go-Commits] [x2goclient] 72/217: deduplicate.sh: parse_otool_output: jump over first matching entry, which is - hopefully - the id line.

git-admin at x2go.org git-admin at x2go.org
Wed Sep 21 01:08:42 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 bafb85456bfd5a731618ee15c60e6f3b206c5898
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Thu Aug 27 05:17:24 2015 +0200

    deduplicate.sh: parse_otool_output: jump over first matching entry, which is - hopefully - the id line.
---
 debian/changelog |    2 ++
 deduplicate.sh   |   11 ++++++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 7dbe22f..2c61439 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -129,6 +129,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium
     - deduplicate.sh: add more useful information in fixup section's error
       message.
     - deduplicate.sh: unstub fixup section.
+    - deduplicate.sh: parse_otool_output: jump over first matching entry,
+      which is - hopefully - the id line.
 
  -- X2Go Release Manager <git-admin at x2go.org>  Mon, 19 Sep 2016 09:07:07 +0200
 
diff --git a/deduplicate.sh b/deduplicate.sh
index 08f13df..c24705d 100755
--- a/deduplicate.sh
+++ b/deduplicate.sh
@@ -29,10 +29,19 @@ set -x
 	typeset oldifs="${IFS}"
 	IFS=''
 
+	# Used for skipping the first matching entry - which should typically be the ID line...
+	# That's a very naïve way to do this. Maybe there should be a bit more magic
+	# to catch this more reliably.
+	typeset -i first="1"
+
 	typeset line=""
 	while read -r line; do
 		if [[ "${line}" =~ ${tmp_regex} ]]; then
-			echo "${BASH_REMATCH[1]}"
+			if [ "${first}" -ne "1" ]; then
+				echo "${BASH_REMATCH[1]}"
+			else
+				first="0"
+			fi
 		fi
 	done <<< "${raw_output}"
 

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