source: trunk/Cocoa/F-Script Anywhere/package-FSA.sh@ 415

Last change on this file since 415 was 411, checked in by Nicholas Riley, 17 years ago

Packaging cleanup.

File size: 1.2 KB
Line 
1#!/bin/zsh
2
3set -x -v
4
5PACKAGEDIR="$PWD"
6PRODUCT="F-Script Anywhere"
7
8cd "$PACKAGEDIR"/Source && \
9source VERSION.xcconfig && \
10find . -name \*~\* -exec rm -r '{}' \; && \
11VERSION=${CURRENT_MARKETING_VERSION} && \
12DMG="$PRODUCT-$VERSION.dmg" VOL="$PRODUCT $VERSION" && \
13DSTROOT="$PACKAGEDIR/$VOL" && \
14sudo rm -rf "$DSTROOT" && \
15sudo rm -rf build/ && \
16rm -rf build/ && \
17xcodebuild -target "Application" -configuration Deployment "DSTROOT=$DSTROOT" DEPLOYMENT_LOCATION=YES install && \
18mkdir "$DSTROOT" && \
19# ditto -rsrc "$PACKAGEDIR"/Source "$DSTROOT"/Source && \
20# rm -rf "$DSTROOT"/Source/build && \
21find "$DSTROOT" -name ".svn" -exec sudo /bin/rm -rf "{}" \; ; \
22cd "$PACKAGEDIR" && \
23rm -f "$DMG" && \
24hdiutil create "$DMG" -megabytes 10 -ov -layout NONE -fs 'HFS+' -volname "$VOL" && \
25MOUNT=`hdiutil attach "$DMG"` && \
26DISK=`echo "$MOUNT" | sed -ne ' s|^/dev/\([^ ]*\).*$|\1|p'` && \
27MOUNTPOINT=`echo "$MOUNT" | sed -ne 's|^.*\(/Volumes/.*\)$|\1|p'` && \
28ditto -rsrc "$DSTROOT" "$MOUNTPOINT" && \
29sudo chmod -R a+rX,u+w "$MOUNTPOINT" && \
30# openUp "$MOUNTPOINT" && \
31hdiutil detach $DISK && \
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/
Note: See TracBrowser for help on using the repository browser.