3 # usage: ./mkdmg-xbmc-osx.sh release/debug (case insensitive)
4 # Allows us to run mkdmg-xbmc-osx.sh from anywhere in the three, rather than the tools/darwin/packaging/xbmc-osx folder only
5 SWITCH=`echo $1 | tr [A-Z] [a-z]`
8 if [ ${SWITCH:-""} = "debug" ]; then
9 echo "Packaging Debug target for OSX"
10 XBMC="$DIRNAME/../../../../build/Debug/XBMC.app"
11 elif [ ${SWITCH:-""} = "release" ]; then
12 echo "Packaging Release target for OSX"
13 XBMC="$DIRNAME/../../../../build/Release/XBMC.app"
15 echo "You need to specify the build target"
19 if [ ! -d $XBMC ]; then
20 echo "XBMC.app not found! are you sure you built $1 target?"
23 ARCHITECTURE=`file $XBMC/Contents/MacOS/XBMC | awk '{print $NF}'`
25 PACKAGE=org.xbmc.xbmc-osx
29 ARCHIVE=${PACKAGE}_${VERSION}-${REVISION}_macosx-intel-${ARCHITECTURE}
31 echo Creating $PACKAGE package version $VERSION revision $REVISION
32 ${SUDO} rm -rf $DIRNAME/$ARCHIVE
34 if [ -e "/Volumes/$ARCHIVE" ]
36 umount /Volumes/$ARCHIVE
39 $DIRNAME/dmgmaker.pl $XBMC $ARCHIVE