source: releases/Pester/1.1b4/package-Pester.sh@ 546

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

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

File size: 1.3 KB
Line 
1#!/bin/zsh
2
3#set -x -v
4
5PACKAGEDIR="$PWD"
6PRODUCT="Pester"
7
8cd "$PACKAGEDIR"/Source && \
9find . -name \*~\* -exec rm -r '{}' \; && \
10rm -f .gdb_history && \
11VERSION=`cat VERSION` && \
12DMG="$PRODUCT-$VERSION.dmg" VOL="$PRODUCT $VERSION" DSTROOT="$PACKAGEDIR/$VOL" && \
13sudo rm -fr "$DSTROOT" && \
14rm -rf build/ && \
15pbxbuild install "DSTROOT=$DSTROOT" && \
16rm -rf build/ && \
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" && \
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'` && \
27ditto -rsrc "$DSTROOT" "$MOUNTPOINT" && \
28chmod -R a+rX,u+w "$MOUNTPOINT" && \
29openUp "$MOUNTPOINT" && \
30hdiutil detach $DISK && \
31hdiutil resize -sectors min "$DMG" && \
32hdiutil convert "$DMG" -format UDZO -imagekey zlib-level=9 -o "z$DMG" && \
33mv "z$DMG" "$DMG" && \
34hdiutil internet-enable "$DMG" && \
35scp "$DMG" ainaz:web/nriley/software/ && \
36cd "$PACKAGEDIR"/Source && \
37agvtool bump -all && \
38:
Note: See TracBrowser for help on using the repository browser.