4 if [ -s "$myname" ] && [ -x "$myname" ]; then
5 # $myname is already a valid file name
10 /*) exit 1;; # absolute path - do not search PATH
12 # Search all directories from the PATH variable. Take
13 # care to interpret leading and trailing ":" as meaning
14 # the current directory; the same is true for "::" within
17 # Replace leading : with . in PATH, store in p
19 # Replace trailing : with .
23 # Temporary input field separator, see FAQ #1
25 # Split the path on colons and loop through each of them
27 [ -f "$dir/$myname" ] || continue # no file
28 [ -x "$dir/$myname" ] || continue # not executable
30 break # only return first matching file
32 # Restore old input field separator
38 if [ ! -f "$mypath" ]; then
39 echo >&2 "cannot find full path name: $myname"
43 SCRIPTDIR=$(dirname $mypath)
44 QUASSEL_VERSION=$(git-describe)
46 if [[ $BUILDTYPE = "Core" ]] || [[ $BUILDTYPE = "Client" ]]; then
47 QUASSEL_DMG="Quassel${BUILDTYPE}_MacOSX-universal_${QUASSEL_VERSION}.dmg"
49 if [[ $BUILDTYPE = "Client" ]]; then
50 cp -r Quassel\ Client.app Client/
51 ${SCRIPTDIR}/macosx_DeployApp.py "Client/Quassel Client.app"
54 ${SCRIPTDIR}/macosx_DeployApp.py --nobundle Core
56 hdiutil create -srcfolder ${BUILDTYPE} -format UDBZ -volname "Quassel ${BUILDTYPE} - ${QUASSEL_VERSION}" "Quassel${BUILDTYPE}_MacOSX-universal_${QUASSEL_VERSION}.dmg" >/dev/null
58 echo >&2 "Valid parameters are \"Client\" or \"Core\""