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

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

package-Pester.sh: Added hdiutil resize, saves some space.

File size: 1.3 KB
RevLine 
[21]1#!/bin/zsh
2
[113]3#set -x -v
[21]4
5PACKAGEDIR="$PWD"
6PRODUCT="Pester"
7
8cd "$PACKAGEDIR"/Source && \
9find . -name \*~\* -exec rm -r '{}' \; && \
[104]10rm -f .gdb_history && \
[21]11VERSION=`cat VERSION` && \
[113]12DMG="$PRODUCT-$VERSION.dmg" VOL="$PRODUCT $VERSION" DSTROOT="$PACKAGEDIR/$VOL" && \
[21]13sudo rm -fr "$DSTROOT" && \
14rm -rf build/ && \
15pbxbuild install "DSTROOT=$DSTROOT" && \
[65]16rm -rf build/ && \
[21]17ditto -rsrc "$PACKAGEDIR"/Source "$DSTROOT"/Source && \
18ditto -rsrc "${PACKAGEDIR}/Read Me" "$DSTROOT" && \
19rm -rf "$DSTROOT"/Source/build "${DSTROOT}/Source/Read Me.rtfd" && \
20find "$DSTROOT" -name ".svn" -exec sudo /bin/rm -rf "{}" \; ; \
21cd "$PACKAGEDIR" && \
22rm -f "$DMG" && \
[113]23hdiutil create "$DMG" -megabytes 5 -ov -layout NONE -fs 'HFS+' -volname "$VOL" && \
24MOUNT=`hdiutil attach "$DMG"` && \
25DISK=`echo "$MOUNT" | sed -ne ' s|^/dev/\([^ ]*\).*$|\1|p'` && \
26MOUNTPOINT=`echo "$MOUNT" | sed -ne 's|^.*\(/Volumes/.*\)$|\1|p'` && \
[21]27ditto -rsrc "$DSTROOT" "$MOUNTPOINT" && \
28chmod -R a+rX,u+w "$MOUNTPOINT" && \
29openUp "$MOUNTPOINT" && \
[113]30hdiutil detach $DISK && \
[116]31hdiutil resize -sectors min "$DMG" && \
[21]32hdiutil convert "$DMG" -format UDZO -imagekey zlib-level=9 -o "z$DMG" && \
33mv "z$DMG" "$DMG" && \
[65]34hdiutil internet-enable "$DMG" && \
[45]35scp "$DMG" ainaz:web/nriley/software/ && \
[113]36cd "$PACKAGEDIR"/Source && \
37agvtool bump -all && \
[21]38:
Note: See TracBrowser for help on using the repository browser.