2014-10-25 04:50:44 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
TMPDIR=/tmp/pkg.$$
|
|
|
|
|
2018-06-13 03:27:01 +00:00
|
|
|
mkdir $TMPDIR
|
2014-10-25 04:50:44 +00:00
|
|
|
cp -R pkg/Templates $TMPDIR
|
2018-06-13 03:27:01 +00:00
|
|
|
cp -R pkg/Specifications $TMPDIR
|
|
|
|
cp -R pkg/Plug-ins $TMPDIR
|
2014-10-25 04:50:44 +00:00
|
|
|
|
2018-07-21 16:15:30 +00:00
|
|
|
cp -R make $TMPDIR/Templates/'Apple II/Apple II cc65 Project.xctemplate/'
|
2018-10-19 01:12:52 +00:00
|
|
|
sed '/PROJECT_TYPE = cc65/s/^# *//' < Makefile > $TMPDIR/Templates/'Apple II/Apple II cc65 Project.xctemplate'/Makefile
|
2018-07-21 16:15:30 +00:00
|
|
|
cp main.c $TMPDIR/Templates/'Apple II/Apple II cc65 Project.xctemplate/'
|
2014-10-25 04:50:44 +00:00
|
|
|
|
2018-07-21 16:15:30 +00:00
|
|
|
cp -R make $TMPDIR/Templates/'Apple II/Apple II ca65 Project.xctemplate/'
|
2018-10-19 01:12:52 +00:00
|
|
|
sed '/PROJECT_TYPE = ca65/s/^# *//' < Makefile > $TMPDIR/Templates/'Apple II/Apple II ca65 Project.xctemplate'/Makefile
|
2014-10-25 04:50:44 +00:00
|
|
|
|
2018-07-19 01:00:01 +00:00
|
|
|
cp -R make $TMPDIR/Templates/'Apple II/Apple II Basic Project.xctemplate/'
|
|
|
|
|
2018-07-21 16:15:30 +00:00
|
|
|
cp -R make $TMPDIR/Templates/'Apple II/Apple II Merlin Project.xctemplate/'
|
|
|
|
|
2019-08-10 03:44:00 +00:00
|
|
|
pkgbuild --root $TMPDIR --version 2.7.3 --identifier com.halcyontouch.Apple2Template.pkg --install-location /Library/Developer/Xcode/ --scripts pkg/scripts/ AppleXcodeTemplate.pkg
|
2014-10-25 04:50:44 +00:00
|
|
|
productbuild --distribution pkg/Distribution.xml --resource ./pkg temp.pkg
|
|
|
|
rm AppleXcodeTemplate.pkg
|
|
|
|
productsign --sign "Developer ID Installer" temp.pkg AppleXcodeTemplate.pkg
|
|
|
|
rm temp.pkg
|
|
|
|
|
|
|
|
rm -rf $TMPDIR
|