forked from C4Labs/C4iOSInstaller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildInstaller.sh
executable file
·32 lines (23 loc) · 966 Bytes
/
buildInstaller.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# buildInstaller.sh
#
# Created by Travis Kirton on 14-06-02.
# sets the version for the current installer
VERSION="0_02"
# builds the component packages, passing the current version
sh buildPackageComponents.sh $VERSION
# defines the names of the component packages, this matches their names defined in the buildPackageComponents.sh script
TEMPLATES_PKG="INSTALL_TEMPLATES_0_02.pkg"
DOCSET_PKG="INSTALL_DOCSET_0_01.pkg"
#builds the distribution xml
productbuild --synthesize --package $TEMPLATES_PKG --package $DOCSET_PKG distribution.xml
#modifies the distribution
sh updateDistributionXML.sh
#builds the distribution package
productbuild --distribution distribution.xml --resources ./resources unsigned.pkg
#signs the package
productsign --sign "Developer ID Installer: Travis Stuart Kirton (75C7KVJZ99)" unsigned.pkg signed.pkg
#renames the package
mv signed.pkg C4Installer_$VERSION.pkg
rm -Rf $TEMPLATES_PKG
rm -Rf $DOCSET_PKG
rm -Rf unsigned.pkg