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)
47 # check the working dir
49 if [[ ! -n $2 ]]; then
52 WORKINGDIR="${WORKINGDIR}/"
53 PACKAGETMPDIR="${WORKINGDIR}PACKAGE_TMP_DIR_${BUILDTYPE}"
54 if [[ $BUILDTYPE = "Core" ]] || [[ $BUILDTYPE = "Client" ]]; then
55 QUASSEL_DMG="Quassel${BUILDTYPE}_MacOSX-universal_${QUASSEL_VERSION}.dmg"
57 if [[ $BUILDTYPE = "Client" ]]; then
58 cp -r ${WORKINGDIR}Quassel\ Client.app ${PACKAGETMPDIR}/
59 ${SCRIPTDIR}/macosx_DeployApp.py "${PACKAGETMPDIR}/Quassel Client.app"
61 cp ${WORKINGDIR}quasselcore ${PACKAGETMPDIR}/
62 ${SCRIPTDIR}/macosx_DeployApp.py --nobundle ${PACKAGETMPDIR}
64 hdiutil create -srcfolder ${PACKAGETMPDIR} -format UDBZ -volname "Quassel ${BUILDTYPE} - ${QUASSEL_VERSION}" "${WORKINGDIR}Quassel${BUILDTYPE}_MacOSX-universal_${QUASSEL_VERSION}.dmg" >/dev/null
65 rm -rf ${PACKAGETMPDIR}
67 echo >&2 "Valid parameters are \"Client\" or \"Core\""