version bump to 13.0 final
[vuplus_xbmc] / tools / darwin / packaging / xbmc-osx / mkdmg-xbmc-osx.sh
1 #!/bin/sh
2
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]`
6 DIRNAME=`dirname $0`
7
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"
14 else
15   echo "You need to specify the build target"
16   exit 1 
17 fi
18
19 if [ ! -d $XBMC ]; then
20   echo "XBMC.app not found! are you sure you built $1 target?"
21   exit 1
22 fi
23 ARCHITECTURE=`file $XBMC/Contents/MacOS/XBMC | awk '{print $NF}'`
24
25 PACKAGE=org.xbmc.xbmc-osx
26
27 VERSION=13.0
28 REVISION=0
29 ARCHIVE=${PACKAGE}_${VERSION}-${REVISION}_macosx-intel-${ARCHITECTURE}
30
31 echo Creating $PACKAGE package version $VERSION revision $REVISION
32 ${SUDO} rm -rf $DIRNAME/$ARCHIVE
33
34 if [ -e "/Volumes/$ARCHIVE" ]
35 then 
36   umount /Volumes/$ARCHIVE
37 fi
38
39 $DIRNAME/dmgmaker.pl $XBMC $ARCHIVE
40
41 echo "done"