2003-02-24 09:15:12 -08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
#########################################################################
|
|
|
|
# #
|
|
|
|
# Objective Caml #
|
|
|
|
# #
|
|
|
|
# Damien Doligez, projet Moscova, INRIA Rocquencourt #
|
|
|
|
# #
|
|
|
|
# Copyright 2003 Institut National de Recherche en Informatique et #
|
|
|
|
# en Automatique. All rights reserved. This file is distributed #
|
|
|
|
# under the terms of the Q Public License version 1.0. #
|
|
|
|
# #
|
|
|
|
#########################################################################
|
|
|
|
|
|
|
|
# $Id$
|
|
|
|
|
|
|
|
cd package-macosx
|
2003-02-24 10:36:16 -08:00
|
|
|
rm -rf ocaml.pkg ocaml-rw.dmg ocaml.dmg
|
2003-02-24 09:15:12 -08:00
|
|
|
|
2003-03-27 08:28:12 -08:00
|
|
|
cat >ocaml.info <<EOF
|
|
|
|
Title Objective Caml
|
|
|
|
Version 3.06
|
|
|
|
Description This package installs Objective Caml version 3.06
|
|
|
|
DefaultLocation /
|
|
|
|
Relocatable no
|
|
|
|
NeedsAuthorization yes
|
|
|
|
Application no
|
|
|
|
InstallOnly no
|
|
|
|
DisableStop no
|
|
|
|
EOF
|
|
|
|
|
2003-02-24 09:15:12 -08:00
|
|
|
package root ocaml.info
|
|
|
|
|
|
|
|
size=`du -s ocaml.pkg | cut -f 1`
|
2003-02-24 10:36:16 -08:00
|
|
|
size=`expr $size + 8192`
|
2003-02-24 09:15:12 -08:00
|
|
|
|
2003-02-24 10:36:16 -08:00
|
|
|
hdiutil create -sectors $size ocaml-rw.dmg
|
|
|
|
name=`hdid -nomount ocaml-rw.dmg | grep Apple_HFS | cut -d ' ' -f 1`
|
2003-02-24 09:15:12 -08:00
|
|
|
newfs_hfs -v 'Objective Caml' $name
|
|
|
|
hdiutil detach $name
|
|
|
|
|
2003-02-24 10:36:16 -08:00
|
|
|
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
|
2003-03-12 08:35:22 -08:00
|
|
|
open "/Volumes/Objective Caml"
|
2003-02-24 09:15:12 -08:00
|
|
|
hdiutil detach $name
|
2003-02-24 10:36:16 -08:00
|
|
|
|
|
|
|
hdiutil convert ocaml-rw.dmg -format UDZO -o ocaml.dmg
|