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

Last change on this file since 104 was 104, checked in by Nicholas Riley, 18 years ago

Remove .gdb_history

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 '{}' \; && \
18rm -f .gdb_history && \
19VERSION=`cat VERSION` && \
20DMG="$PRODUCT-$VERSION.dmg" VOL="$PRODUCT $VERSION" MOUNTPOINT="/Volumes/$VOL" && \
21DSTROOT="$PACKAGEDIR/$VOL" && \
22sudo rm -fr "$DSTROOT" && \
23rm -rf build/ && \
24pbxbuild install "DSTROOT=$DSTROOT" && \
25rm -rf build/ && \
26ditto -rsrc "$PACKAGEDIR"/Source "$DSTROOT"/Source && \
27ditto -rsrc "${PACKAGEDIR}/Read Me" "$DSTROOT" && \
28rm -rf "$DSTROOT"/Source/build "${DSTROOT}/Source/Read Me.rtfd" && \
29#breaks in 10.2 and later, sigh.
30#mkdir "$DSTROOT/Read Me.rtfd" && \
31#cd "$DSTROOT/Read Me.rtfd" && \
32#for i in "../Pester.app/Contents/Resources/Read Me.rtfd"/*; do ln -s "$i"; done && \
33find "$DSTROOT" -name ".svn" -exec sudo /bin/rm -rf "{}" \; ; \
34cd "$PACKAGEDIR" && \
35rm -f "$DMG" && \
36hdiutil create "$DMG" -megabytes 5 -ov -type UDIF && \
37DISK=`hdid -nomount "$DMG" | sed -ne ' /Apple_partition_scheme/ s|^/dev/\([^ ]*\).*$|\1|p'` && \
38newfs_hfs -v "$VOL" "/dev/r${DISK}s2" && \
39hdiutil eject "$DISK" && \
40hdid "$DMG" && \
41ditto -rsrc "$DSTROOT" "$MOUNTPOINT" && \
42chmod -R a+rX,u+w "$MOUNTPOINT" && \
43openUp "$MOUNTPOINT" && \
44# sleep 2 && \
45hdiutil eject $DISK && \
46# osascript -e "tell application \"Finder\" to eject disk \"$VOL\"" && \
47hdiutil convert "$DMG" -format UDZO -imagekey zlib-level=9 -o "z$DMG" && \
48mv "z$DMG" "$DMG" && \
49hdiutil internet-enable "$DMG" && \
50scp "$DMG" ainaz:web/nriley/software/ && \
51:
Note: See TracBrowser for help on using the repository browser.