2017-05-17 02:34:15 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
TMPDIR=/tmp/pkg.$$
|
|
|
|
|
|
|
|
cp -R pkg/Templates $TMPDIR
|
|
|
|
|
2017-05-17 05:04:32 +00:00
|
|
|
PROJECTS=/tmp/projects.$$
|
|
|
|
cat > $PROJECTS << EOF
|
|
|
|
shell:Shell Command in C
|
|
|
|
shell:Shell Command in Assembly
|
|
|
|
cda:Classic Desk Accessory in C
|
|
|
|
nda:New Desk Accessory in C
|
|
|
|
desktop:Desktop Application in C
|
|
|
|
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}'`
|
|
|
|
PROJECTNAME=`echo $PROJECT | awk -F: '{print $2}'`
|
|
|
|
sed "/^# TARGETTYPE=${PROJECTTYPE}/s/^# //" Makefile > "${TMPDIR}/Apple IIgs/${PROJECTNAME}.xctemplate/Makefile"
|
|
|
|
cp -R make "${TMPDIR}/Apple IIgs/${PROJECTNAME}.xctemplate/"
|
|
|
|
done < $PROJECTS
|
|
|
|
|
|
|
|
rm -f $PROJECTS
|
2017-05-17 02:34:15 +00:00
|
|
|
|
|
|
|
pkgbuild --root $TMPDIR --version 0.1 --identifier com.halcyontouch.Apple2gsTemplate.pkg --install-location /Library/Developer/Xcode/Templates/ --scripts pkg/scripts/ Apple2GSXcodeTemplate.pkg
|
|
|
|
productbuild --distribution pkg/Distribution.xml --resource ./pkg temp.pkg
|
|
|
|
rm Apple2GSXcodeTemplate.pkg
|
|
|
|
#productsign --sign "Developer ID Installer: Halcyon Touch Software" temp.pkg Apple2GSXcodeTemplate.pkg
|
|
|
|
cp temp.pkg Apple2GSXcodeTemplate.pkg
|
|
|
|
rm temp.pkg
|
|
|
|
|
|
|
|
rm -rf $TMPDIR
|