Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /osx-dist/build-pkg.sh
ViewVC logotype

Annotation of /osx-dist/build-pkg.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3844 - (view) (download) (as text)

1 : jhr 3841 #!/bin/sh
2 :     #
3 :     # Script to build the installer package for x86 on Mac OS X (10.7+)
4 :     #
5 :    
6 :     # FIXME: check for VERSION argument!!!
7 :     VERSION=$1
8 : jhr 3842 CONFIGURL=http://smlnj.cs.uchicago.edu/dist/working/$VERSION/config.tgz
9 :     DISTROOT=smlnj.dst
10 : jhr 3844 ID=org.smlnj.x86
11 : jhr 3842 ROOT=$(pwd)
12 : jhr 3841
13 : jhr 3844 # you need a developer ID to sign the final package
14 :     #
15 :     SIGN="Developer ID Installer: John Reppy"
16 :    
17 : jhr 3842 if [ -d $ROOT ] ; then
18 :     echo "please remove $ROOT first"
19 :     exit 1
20 :     fi
21 :     mkdir $ROOT
22 :     cd $ROOT
23 :    
24 :     # first we need to download and unbundle the config directory for the release
25 :     #
26 :     curl -O $CONFIGURL
27 :     tar -xzf config.tgz
28 :    
29 :     # check that the version numbers match
30 :     #
31 :     CONFIG_VERSION=$(cat config/version)
32 :     if [ x"$VERSION" != x"$CONFIG_VERSION" ] ; then
33 :     echo "version in config/version is $CONFIG_VERSION"
34 :     exit 1
35 :     fi
36 :    
37 :     # build the distribution (note that this assumes that config/targets is what we want!)
38 :     #
39 :     config/install.sh
40 :    
41 :     # get the other files to include in the distribution
42 :     #
43 :     cp -p $ROOT/components/license.html .
44 :     svn export https://smlnj-gforge.cs.uchicago.edu/svn/smlnj/sml/trunk/READMES/$VERSION-README.html
45 :    
46 :     # cleanup
47 :     #
48 :     rm *tgz
49 :    
50 :     # back up to the root
51 :     #
52 :     cd $ROOT
53 :    
54 : jhr 3841 # patch distribution file for version
55 :     #
56 : jhr 3842 sed -e "s/VERSION/$VERSION/g" components/distribution_xml.in > distribution.xml
57 : jhr 3841
58 :     # build package
59 :     #
60 : jhr 3844 pkgbuild --identifier $ID --scripts components/scripts/ --install-location /usr/local/smlnj --root $DISTROOT smlnj.pkg
61 : jhr 3841
62 :     # build distribution package
63 :     #
64 : jhr 3844 productbuild --sign "$SIGN" --distribution distribution.xml --package-path . ./smlnj-x86-$VERSION.pkg
65 : jhr 3842
66 :     # cleanup
67 :     #
68 :     #rm distribution.xml

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0