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