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