Add nascent make_dmg script.
authorCarl Hetherington <cth@carlh.net>
Wed, 29 May 2013 22:14:18 +0000 (23:14 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 29 May 2013 22:14:18 +0000 (23:14 +0100)
platform/osx/make_dmg.sh [new file with mode: 0644]

diff --git a/platform/osx/make_dmg.sh b/platform/osx/make_dmg.sh
new file mode 100644 (file)
index 0000000..90e5f9e
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+VERSION=@version@
+
+# DMG size in megabytes
+DMG_SIZE=64
+
+dmg_name="dvdomatic-$VERSION"
+
+mkdir -p build/platform/osx/mnt
+
+hdiutil create -megabytes $DMG_SIZE build/platform/osx/dvdomatic.dmg
+device=$(hdid -nomount build/platform/osx/dvdomatic.dmg | grep Apple_HFS | cut -f 1 -d ' ')
+newfs_hfs -v "$dmg_name" "$device"
+mount -t hfs "${device}" build/platform/osx/mnt