diff options
author | Luc Maranget <luc.maranget@inria.fr> | 2008-10-14 07:37:28 +0000 |
---|---|---|
committer | Luc Maranget <luc.maranget@inria.fr> | 2008-10-14 07:37:28 +0000 |
commit | 30324d6b928ea56455557231dcb366afad6ea4fd (patch) | |
tree | 5c1e8d1edb2cdcf4093ba4c00150689e690872f6 /tools/make-package-macosx | |
parent | 80b8675a58d6fe32629708ce33723422fc6d9af4 (diff) | |
download | ocaml-30324d6b928ea56455557231dcb366afad6ea4fd.tar.gz |
premier commit 311
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/jocamltrunk@9081 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'tools/make-package-macosx')
-rwxr-xr-x | tools/make-package-macosx | 39 |
1 files changed, 13 insertions, 26 deletions
diff --git a/tools/make-package-macosx b/tools/make-package-macosx index 1839c52c61..5a1b76eef1 100755 --- a/tools/make-package-macosx +++ b/tools/make-package-macosx @@ -18,23 +18,8 @@ cd package-macosx rm -rf ocaml.pkg ocaml-rw.dmg VERSION=`head -1 ../VERSION` -VERSION_MAJOR=`sed -n -e '1s/^\([0-9]*\)\..*/\1/p' ../VERSION -VERSION_MINOR=`sed -n -e '1s/^[0-9]*\.\([0-9]*\)[.+].*/\1/p' ../VERSION - -# Worked in 10.2: - -# cat >ocaml.info <<EOF -# Title Objective Caml -# Version ${VERSION} -# Description This package installs Objective Caml version ${VERSION} -# DefaultLocation / -# Relocatable no -# NeedsAuthorization yes -# Application no -# InstallOnly no -# DisableStop no -# EOF -#package root ocaml.info +VERSION_MAJOR=`sed -n -e '1s/^\([0-9]*\)\..*/\1/p' ../VERSION` +VERSION_MINOR=`sed -n -e '1s/^[0-9]*\.\([0-9]*\)[.+].*/\1/p' ../VERSION` cat >Description.plist <<EOF <?xml version="1.0" encoding="UTF-8"?> @@ -101,8 +86,8 @@ mkdir -p resources # stop here -> | cat >resources/ReadMe.txt <<EOF This package installs Objective Caml version ${VERSION}. -You need Mac OS X 10.4.x (Tiger), with X11 and the -XCode tools (v2.4) installed. +You need Mac OS X 10.5.x (Leopard), with the +XCode tools (v3.x) installed (and optionally X11). Files will be installed in the following directories: @@ -112,7 +97,7 @@ Files will be installed in the following directories: EOF chmod -R g-w root -sudo chown -R root:admin root +sudo chown -R root:wheel root /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker \ -build -p "`pwd`/ocaml.pkg" -f "`pwd`/root" -i "`pwd`/Info.plist" \ @@ -123,18 +108,20 @@ size=`expr $size + 8192` 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 +volname="Objective Caml ${VERSION}" +newfs_hfs -v "$volname" $name hdiutil detach $name 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" - cp resources/ReadMe.txt "/Volumes/Objective Caml/" +if test -d "/Volumes/$volname"; then + ditto -rsrcFork ocaml.pkg "/Volumes/$volname/ocaml.pkg" + cp resources/ReadMe.txt "/Volumes/$volname/" else - echo 'Unable to mount the disk image as "/Volumes/Objective Caml"' >&2 + echo "Unable to mount the disk image as \"/Volumes/$volname\"" >&2 exit 3 fi -open "/Volumes/Objective Caml" +open "/Volumes/$volname" +sleep 2 hdiutil detach $name rm -rf "ocaml-${VERSION}.dmg" |