This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch feature/cleanup in repository x2goclient. commit 73af76eee812cbe895c435027c23ff554565a639 Author: Mihai Moldovan <ionic@ionic.de> Date: Wed Feb 18 04:40:00 2015 +0100 macbuild.sh: add usage message obtainable via -h or --help. --- debian/changelog | 1 + macbuild.sh | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/debian/changelog b/debian/changelog index fca4fa1..f17a690 100644 --- a/debian/changelog +++ b/debian/changelog @@ -257,6 +257,7 @@ x2goclient (4.0.3.2-0x2go1) unstable; urgency=medium - New env var/parameter UNIVERSAL in macbuild.sh. Switches the build architecture to either exclusively x86_64 (UNIVERSAL=0) or both x86_64 and x86 (UNIVERSAL=1). + - Add usage message to macbuild.sh obtainable via -h or --help. -- X2Go Release Manager <git-admin@x2go.org> Thu, 19 Feb 2015 12:49:22 +0100 diff --git a/macbuild.sh b/macbuild.sh index e25caf5..5e68928 100755 --- a/macbuild.sh +++ b/macbuild.sh @@ -19,6 +19,28 @@ phase() { echo } +usage() { + exec >&2 + + NO_VAL="0, no, NO, No, nO, false or FALSE" + printf "$(basename ${0}): usage\n\n" + printf "Accepted environment variables:\n" + printf "\tSDK:\t\t\t\tsets the target SDK [string]\n\t\t\t\t\tdefault: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk\n" + printf "\tMACOSX_DEPLOYMENT_TARGET:\tsets the deployment target (specific OS X version to optimize/build for) [string]\n\t\t\t\t\tdefault: 10.7\n" + printf "\tDEBUG\t\t\t\tenables or disables debug builds [boolean]\n\t\t\t\t\tdefault: disabled\n" + printf "\tBUNDLE\t\t\t\tenables or disables library bundling and the creation of a .dmg installer [boolean]\n\t\t\t\t\tdefault: enabled\n" + printf "\tUNIVERSAL\t\t\tenables or disables x86 support. x86_64 support is always enabled [boolean]\n\t\t\t\t\tdefault: enabled\n" + printf "\n" + printf "Boolean values help:\n" + printf "\ta value of ${NO_VAL} will be treated as false\n" + printf "\tany other value will be treated as true\n" + + exit 2 +} + +MATCH_HELP='(^((-h)|(--help))([ ]|$))|([ ]+((-h)|(--help))([ ]|$))' +[ -n "${*}" ] && [[ "${*}" =~ ${MATCH_HELP} ]] && usage + NAME="x2goclient" TOP_DIR="$(dirname "$0")" -- Alioth's /srv/git/code.x2go.org/x2goclient.git//../..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git