Last change
on this file since 559 was 482, checked in by Nicholas Riley, 16 years ago |
package-ICeCoffEE.sh: Long-overdue use of -e instead of repeated &&.
|
File size:
1.3 KB
|
Line | |
---|
1 | #!/bin/sh -e
|
---|
2 |
|
---|
3 | set -x -v
|
---|
4 |
|
---|
5 | PACKAGEDIR="$PWD"
|
---|
6 | PRODUCT="ICeCoffEE"
|
---|
7 |
|
---|
8 | cd "$PRODUCT"
|
---|
9 | source VERSION.xcconfig
|
---|
10 | find . -name \*~ -exec rm '{}' \;
|
---|
11 | VERSION=${CURRENT_MARKETING_VERSION}
|
---|
12 | DMG="$PRODUCT-$VERSION.dmg" VOL="$PRODUCT $VERSION"
|
---|
13 | DSTROOT="$PACKAGEDIR/$VOL"
|
---|
14 | sudo rm -rf "$DSTROOT"
|
---|
15 | sudo rm -rf build/
|
---|
16 | rm -rf build/
|
---|
17 | xcodebuild -target "ICeCoffEE Installer" -configuration Deployment "DSTROOT=$DSTROOT" DEPLOYMENT_LOCATION=YES install
|
---|
18 | mkdir "$DSTROOT"
|
---|
19 | mv "build/Deployment/$PRODUCT Installer.app" "$DSTROOT/$PRODUCT $VERSION Installer.app"
|
---|
20 | sudo rm -rf build/
|
---|
21 | find "$DSTROOT" -name ".svn" -type d -exec sudo /bin/rm -rf "{}" \; || true
|
---|
22 | # uncomment to include localizations
|
---|
23 | find "$DSTROOT" -name \*.lproj -type d -and -not -name English.lproj -exec sudo rm -rf "{}" \; || true
|
---|
24 | cd "$PACKAGEDIR"
|
---|
25 | rm -f "$DMG"
|
---|
26 | # XXX can make shorter now with hdiutil create -srcfolder...
|
---|
27 | hdiutil create "$DMG" -megabytes 5 -ov -layout NONE -fs 'HFS+' -volname "$VOL"
|
---|
28 | MOUNT=`hdiutil attach "$DMG"`
|
---|
29 | DISK=`echo "$MOUNT" | sed -ne ' s|^/dev/\([^ ]*\).*$|\1|p'`
|
---|
30 | MOUNTPOINT=`echo "$MOUNT" | sed -ne 's|^.*\(/Volumes/.*\)$|\1|p'`
|
---|
31 | ditto -rsrc "$DSTROOT" "$MOUNTPOINT"
|
---|
32 | sudo chmod -R a+rX,u+w "$MOUNTPOINT"
|
---|
33 | hdiutil detach $DISK
|
---|
34 | hdiutil resize -sectors min "$DMG"
|
---|
35 | hdiutil convert "$DMG" -format UDBZ -o "z$DMG"
|
---|
36 | mv "z$DMG" "$DMG"
|
---|
37 | hdiutil internet-enable "$DMG"
|
---|
38 | # scp "$DMG" ainaz:web/nriley/software/
|
---|
39 | :
|
---|
Note:
See
TracBrowser
for help on using the repository browser.