summaryrefslogtreecommitdiff
path: root/tools/make-package-macosx
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2003-02-24 18:36:16 +0000
committerDamien Doligez <damien.doligez-inria.fr>2003-02-24 18:36:16 +0000
commitc517632cb20ca21542ab307beb6a92ef42fd35eb (patch)
treed14d22c9b3195b99248eb0d9cef6a5328b459178 /tools/make-package-macosx
parent2d4c4aadedd34f4f2cac8a9f6d593691d2b0dd5b (diff)
downloadocaml-c517632cb20ca21542ab307beb6a92ef42fd35eb.tar.gz
ameliorations
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5403 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'tools/make-package-macosx')
-rwxr-xr-xtools/make-package-macosx19
1 files changed, 13 insertions, 6 deletions
diff --git a/tools/make-package-macosx b/tools/make-package-macosx
index 373403a1d4..53ef870ae3 100755
--- a/tools/make-package-macosx
+++ b/tools/make-package-macosx
@@ -15,18 +15,25 @@
# $Id$
cd package-macosx
-rm -f ocaml.pkg ocaml.dmg
+rm -rf ocaml.pkg ocaml-rw.dmg ocaml.dmg
package root ocaml.info
size=`du -s ocaml.pkg | cut -f 1`
-size=`expr \( $size \* 11 \) / 10 + 500`
+size=`expr $size + 8192`
-hdiutil create -sectors $size ocaml.dmg
-name=`hdid -nomount ocaml.dmg | grep Apple_HFS | cut -d ' ' -f 1`
+hdiutil create -sectors $size ocaml-rw.dmg
+name=`hdid -nomount ocaml-rw.dmg | grep Apple_HFS | cut -d ' ' -f 1`
newfs_hfs -v 'Objective Caml' $name
hdiutil detach $name
-name=`hdid ocaml.dmg | grep Apple_HFS | cut -d ' ' -f 1`
-ditto -rsrcFork ocaml.pkg "/Volumes/Objective Caml/ocaml.pkg"
+name=`hdid ocaml-rw.dmg | grep Apple_HFS | cut -d ' ' -f 1`
+if test -d '/Volumes/Objective Caml'; then
+ ditto -rsrcFork ocaml.pkg "/Volumes/Objective Caml/ocaml.pkg"
+else
+ echo 'Unable to mount the disk image as "/Volumes/Objective Caml"' >&2
+ exit 3
+fi
hdiutil detach $name
+
+hdiutil convert ocaml-rw.dmg -format UDZO -o ocaml.dmg