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 3842 - (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 :     ROOT=$(pwd)
11 : jhr 3841
12 : jhr 3842 if [ -d $ROOT ] ; then
13 :     echo "please remove $ROOT first"
14 :     exit 1
15 :     fi
16 :     mkdir $ROOT
17 :     cd $ROOT
18 :    
19 :     # first we need to download and unbundle the config directory for the release
20 :     #
21 :     curl -O $CONFIGURL
22 :     tar -xzf config.tgz
23 :    
24 :     # check that the version numbers match
25 :     #
26 :     CONFIG_VERSION=$(cat config/version)
27 :     if [ x"$VERSION" != x"$CONFIG_VERSION" ] ; then
28 :     echo "version in config/version is $CONFIG_VERSION"
29 :     exit 1
30 :     fi
31 :    
32 :     # build the distribution (note that this assumes that config/targets is what we want!)
33 :     #
34 :     config/install.sh
35 :    
36 :     # get the other files to include in the distribution
37 :     #
38 :     cp -p $ROOT/components/license.html .
39 :     svn export https://smlnj-gforge.cs.uchicago.edu/svn/smlnj/sml/trunk/READMES/$VERSION-README.html
40 :    
41 :     # cleanup
42 :     #
43 :     rm *tgz
44 :    
45 :     # back up to the root
46 :     #
47 :     cd $ROOT
48 :    
49 : jhr 3841 # patch distribution file for version
50 :     #
51 : jhr 3842 sed -e "s/VERSION/$VERSION/g" components/distribution_xml.in > distribution.xml
52 : jhr 3841
53 :     # build package
54 :     #
55 : jhr 3842 pkgbuild --scripts components/scripts/ --install-location /usr/local/smlnj --root $DISTROOT smlnj.pkg
56 : jhr 3841
57 :     # build distribution package
58 :     #
59 : jhr 3842 productbuild --sign "Mac Developer: Rich Manalang (3U78U4KMEF)" \
60 :     --distribution distribution.xml --package-path . ./smlnj-x86-$VERSION.pkg
61 :    
62 :     # cleanup
63 :     #
64 :     #rm distribution.xml

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