Apple2BuildPipeline/pkg/createPackage
2023-09-17 23:25:39 -04:00

28 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
TMPDIR=/tmp/pkg.$$
mkdir $TMPDIR
cp -R pkg/Templates $TMPDIR
cp -R pkg/Specifications $TMPDIR
cp -R pkg/Plug-ins $TMPDIR
cp -R make $TMPDIR/Templates/'Apple II/Apple II cc65 Project.xctemplate/'
sed '/PROJECT_TYPE = cc65/s/^# *//' < Makefile > $TMPDIR/Templates/'Apple II/Apple II cc65 Project.xctemplate'/Makefile
cp main.c $TMPDIR/Templates/'Apple II/Apple II cc65 Project.xctemplate/'
cp -R make $TMPDIR/Templates/'Apple II/Apple II ca65 Project.xctemplate/'
sed '/PROJECT_TYPE = ca65/s/^# *//' < Makefile > $TMPDIR/Templates/'Apple II/Apple II ca65 Project.xctemplate'/Makefile
cp -R make $TMPDIR/Templates/'Apple II/Apple II Basic Project.xctemplate/'
cp -R make $TMPDIR/Templates/'Apple II/Apple II Merlin Project.xctemplate/'
pkgbuild --root $TMPDIR --version 2.7.3 --identifier com.halcyontouch.Apple2Template.pkg --install-location /Library/Developer/Xcode/ --scripts pkg/scripts/ AppleXcodeTemplate.pkg
productbuild --distribution pkg/Distribution.xml --resource ./pkg temp.pkg
rm AppleXcodeTemplate.pkg
productsign --sign "3rd Party Mac Developer Installer" temp.pkg AppleXcodeTemplate.pkg
rm temp.pkg
rm -rf $TMPDIR