source: trunk/Cocoa/Pester/package-Pester.sh@ 90

Last change on this file since 90 was 65, checked in by Nicholas Riley, 22 years ago

Remove build folder when completed to avoid problems building from Project Builder later; Internet-enable disk image for Disk Copy in Mac OS X 10.2.3 and later (makes self extracting)

File size: 1.7 KB
Line 
1#!/bin/zsh
2
3# stuff to do:
4# hdiutil create DiskImage.dmg -megabytes <size> -layout NONE
5# hdid -nomount DiskImage.dmg
6# sudo /sbin/newfs_hfs -w -v VolumeName -b 4096 /dev/disk2
7# hdiutil eject /dev/disk2
8
9# also check out 'build' on mosxland.sf.net
10
11# set -x -v
12
13PACKAGEDIR="$PWD"
14PRODUCT="Pester"
15
16cd "$PACKAGEDIR"/Source && \
17find . -name \*~\* -exec rm -r '{}' \; && \
18VERSION=`cat VERSION` && \
19DMG="$PRODUCT-$VERSION.dmg" VOL="$PRODUCT $VERSION" MOUNTPOINT="/Volumes/$VOL" && \
20DSTROOT="$PACKAGEDIR/$VOL" && \
21sudo rm -fr "$DSTROOT" && \
22rm -rf build/ && \
23pbxbuild install "DSTROOT=$DSTROOT" && \
24rm -rf build/ && \
25ditto -rsrc "$PACKAGEDIR"/Source "$DSTROOT"/Source && \
26ditto -rsrc "${PACKAGEDIR}/Read Me" "$DSTROOT" && \
27rm -rf "$DSTROOT"/Source/build "${DSTROOT}/Source/Read Me.rtfd" && \
28#breaks in 10.2 and later, sigh.
29#mkdir "$DSTROOT/Read Me.rtfd" && \
30#cd "$DSTROOT/Read Me.rtfd" && \
31#for i in "../Pester.app/Contents/Resources/Read Me.rtfd"/*; do ln -s "$i"; done && \
32find "$DSTROOT" -name ".svn" -exec sudo /bin/rm -rf "{}" \; ; \
33cd "$PACKAGEDIR" && \
34rm -f "$DMG" && \
35hdiutil create "$DMG" -megabytes 5 -ov -type UDIF && \
36DISK=`hdid -nomount "$DMG" | sed -ne ' /Apple_partition_scheme/ s|^/dev/\([^ ]*\).*$|\1|p'` && \
37newfs_hfs -v "$VOL" "/dev/r${DISK}s2" && \
38hdiutil eject "$DISK" && \
39hdid "$DMG" && \
40ditto -rsrc "$DSTROOT" "$MOUNTPOINT" && \
41chmod -R a+rX,u+w "$MOUNTPOINT" && \
42openUp "$MOUNTPOINT" && \
43# sleep 2 && \
44hdiutil eject $DISK && \
45# osascript -e "tell application \"Finder\" to eject disk \"$VOL\"" && \
46hdiutil convert "$DMG" -format UDZO -imagekey zlib-level=9 -o "z$DMG" && \
47mv "z$DMG" "$DMG" && \
48hdiutil internet-enable "$DMG" && \
49scp "$DMG" ainaz:web/nriley/software/ && \
50:
Note: See TracBrowser for help on using the repository browser.