2017-05-17 02:34:15 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
TMPDIR=/tmp/pkg.$$
|
|
|
|
|
2017-09-01 03:36:51 +00:00
|
|
|
mkdir $TMPDIR
|
2017-05-17 02:34:15 +00:00
|
|
|
cp -R pkg/Templates $TMPDIR
|
2017-09-01 03:36:51 +00:00
|
|
|
cp -R pkg/Specifications $TMPDIR
|
|
|
|
cp -R pkg/Plug-ins $TMPDIR
|
2017-05-17 02:34:15 +00:00
|
|
|
|
2017-05-17 05:04:32 +00:00
|
|
|
PROJECTS=/tmp/projects.$$
|
|
|
|
cat > $PROJECTS << EOF
|
2018-07-25 03:39:21 +00:00
|
|
|
cda:orca:ORCAC Classic Desk Accessory
|
|
|
|
cda:orca:ORCAM Classic Desk Accessory
|
|
|
|
cdev:orca:ORCAC Control Panel
|
2018-08-03 04:26:04 +00:00
|
|
|
cdev:orca:ORCAM Control Panel
|
2018-07-25 03:39:21 +00:00
|
|
|
desktop:orca:ORCAC Desktop Application
|
|
|
|
shell:gno:ORCAC GNO Shell Command
|
|
|
|
nda:orca:ORCAC New Desk Accessory
|
2018-08-03 03:28:17 +00:00
|
|
|
nda:orca:ORCAM New Desk Accessory
|
2018-07-25 03:39:21 +00:00
|
|
|
shell:orca:ORCAC Shell Command
|
|
|
|
shell:orca:ORCAM Shell Command
|
2017-05-17 05:04:32 +00:00
|
|
|
EOF
|
|
|
|
|
|
|
|
while read PROJECT
|
2017-05-17 02:34:15 +00:00
|
|
|
do
|
2017-05-17 05:04:32 +00:00
|
|
|
PROJECTTYPE=`echo $PROJECT | awk -F: '{print $1}'`
|
2017-09-10 04:23:12 +00:00
|
|
|
SHELLTYPE=`echo $PROJECT | awk -F: '{print $2}'`
|
|
|
|
PROJECTNAME=`echo $PROJECT | awk -F: '{print $3}'`
|
|
|
|
sed "
|
|
|
|
/^# TARGETTYPE=${PROJECTTYPE}/s/^# //
|
|
|
|
/^# export ORCA=.*\/${SHELLTYPE}$/s/^# //" Makefile > "${TMPDIR}/Templates/Apple IIgs/${PROJECTNAME}.xctemplate/Makefile"
|
2017-09-01 03:36:51 +00:00
|
|
|
cp -R make "${TMPDIR}/Templates/Apple IIgs/${PROJECTNAME}.xctemplate/"
|
2017-05-17 05:04:32 +00:00
|
|
|
done < $PROJECTS
|
|
|
|
|
|
|
|
rm -f $PROJECTS
|
2017-05-17 02:34:15 +00:00
|
|
|
|
2018-06-13 03:30:16 +00:00
|
|
|
pkgbuild --root $TMPDIR --version 1.1 --identifier com.halcyontouch.Apple2gsTemplate.pkg --install-location /Library/Developer/Xcode/ --scripts pkg/scripts/ Apple2GSXcodeTemplate.pkg
|
2017-05-17 02:34:15 +00:00
|
|
|
productbuild --distribution pkg/Distribution.xml --resource ./pkg temp.pkg
|
|
|
|
rm Apple2GSXcodeTemplate.pkg
|
2017-09-10 04:28:45 +00:00
|
|
|
productsign --sign "Developer ID Installer" temp.pkg Apple2GSXcodeTemplate.pkg
|
2017-05-17 02:34:15 +00:00
|
|
|
rm temp.pkg
|
|
|
|
|
2017-09-10 04:28:45 +00:00
|
|
|
rm -rf $TMPDIR
|