This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch feature/cleanup in repository x2goclient. commit 867649e6702a06d13dd695051910ec49ee2de28e Author: Mihai Moldovan <ionic@ionic.de> Date: Wed Feb 18 03:21:13 2015 +0100 macbuild.sh: define, implement and use new function 'make_boolean()'. Takes a pseudo-boolean value and outputs either 0 or 1. --- debian/changelog | 2 ++ macbuild.sh | 25 ++++++++++++++++--------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/debian/changelog b/debian/changelog index 50e5758..60cfbee 100644 --- a/debian/changelog +++ b/debian/changelog @@ -227,6 +227,8 @@ x2goclient (4.0.3.2-0x2go1) UNRELEASED; urgency=medium client build directory. Remove redundancy from macbuild.sh. - Remove 'function' keyword in macbuild.sh, as it's causing undefined behavior according to SUS. + - Define and implement new function 'make_boolean()' in macbuild.sh. Takes + a pseudo-boolean value and outputs either 0 or 1. Use this function. -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Thu, 27 Nov 2014 12:01:43 +0100 diff --git a/macbuild.sh b/macbuild.sh index 9e6ba76..c5e25d5 100755 --- a/macbuild.sh +++ b/macbuild.sh @@ -16,15 +16,22 @@ NXPROXY="$(which nxproxy)" : ${DEBUG:="0"} : ${BUNDLE:="1"} -case "${DEBUG}" in - ("0"|"no"|""|"No"|"nO"|"NO"|"false"|"FALSE") BUILD_MODE="release";; - (*) BUILD_MODE="debug";; -esac - -case "${BUNDLE}" in - ("0"|"no"|""|"No"|"nO"|"NO"|"false"|"FALSE") BUNDLE="0";; - (*) BUNDLE="1";; -esac + +make_boolean() { + OPTION="${1}" + + case "${OPTION}" in + ("0"|"no"|""|"No"|"nO"|"NO"|"false"|"FALSE") OPTION="0";; + (*) OPTION="1";; + esac + + printf "${OPTION}" +} + +DEBUG="$(make_boolean "${DEBUG}")" +BUNDLE="$(make_boolean "${BUNDLE}")" + +[ "${DEBUG}" -eq "0" ] && BUILD_MODE="release" || BUILD_MODE="debug" SDK_MINOR_VERSION="$(/usr/bin/perl -pe 's#.*?10\.(\d+).*?\.sdk$#\1#' <<< "${SDK}")" -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git