[X2Go-Commits] [x2goclient] 35/52: macbuild.sh: add new dependency_error() helper function.

git-admin at x2go.org git-admin at x2go.org
Thu Jul 30 04:47:08 CEST 2015


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

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

commit 22de044ff07da68e7fb48ba4f60fcde2ce744078
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Sun May 3 23:19:59 2015 +0200

    macbuild.sh: add new dependency_error() helper function.
---
 debian/changelog |    1 +
 macbuild.sh      |   14 ++++++++++++++
 2 files changed, 15 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 036a0b3..3df6f29 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -64,6 +64,7 @@ x2goclient (4.0.5.1-0x2go1) UNRELEASED; urgency=low
     - pulsemanager.{cpp,h}: new class for PulseAudio management.
     - x2goclient.pro{,.maemo}: reference new pulsemanager.{cpp,h} files.
     - macbuild.sh: add new MACPORTS_PREFIX detection/variable.
+    - macbuild.sh: add new dependency_error() helper function.
 
  -- X2Go Release Manager <git-admin at x2go.org>  Tue, 28 Jul 2015 06:05:27 +0200
 
diff --git a/macbuild.sh b/macbuild.sh
index 6c42c44..10b0f50 100755
--- a/macbuild.sh
+++ b/macbuild.sh
@@ -39,6 +39,20 @@ usage() {
 	exit 2
 }
 
+dependency_error() {
+	exec >&2
+
+	typeset element="${1}"; shift
+	typeset component="${1}"; shift
+	typeset type="${1}"; shift
+
+	echo "${element} ${type} not found."
+	echo "Install ${component} -- e.g., via "port -vt install ${component}" if using MacPorts."
+	echo "If ${component} is already installed, try passing MACPORTS_PREFIX if the autodetected or default value (${MACPORTS_PREFIX}) does not match your setup."
+
+	exit 3
+}
+
 MATCH_HELP='(^((-h)|(--help))([ 	]|$))|([ 	]+((-h)|(--help))([ 	]|$))'
 [ -n "${*}" ] && [[ "${*}" =~ ${MATCH_HELP} ]] && usage
 

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