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

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