Line | |
---|
1 | #!/bin/zsh
|
---|
2 |
|
---|
3 | set -x -v
|
---|
4 |
|
---|
5 | PACKAGEDIR="$PWD"
|
---|
6 | PRODUCT="F-Script Anywhere"
|
---|
7 |
|
---|
8 | cd "$PACKAGEDIR"/Source && \
|
---|
9 | source VERSION.xcconfig && \
|
---|
10 | find . -name \*~\* -exec rm -r '{}' \; && \
|
---|
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 "Application" -configuration Deployment "DSTROOT=$DSTROOT" DEPLOYMENT_LOCATION=YES install && \
|
---|
18 | mkdir "$DSTROOT" && \
|
---|
19 | # ditto -rsrc "$PACKAGEDIR"/Source "$DSTROOT"/Source && \
|
---|
20 | # rm -rf "$DSTROOT"/Source/build && \
|
---|
21 | find "$DSTROOT" -name ".svn" -exec sudo /bin/rm -rf "{}" \; ; \
|
---|
22 | cd "$PACKAGEDIR" && \
|
---|
23 | rm -f "$DMG" && \
|
---|
24 | hdiutil create "$DMG" -megabytes 10 -ov -layout NONE -fs 'HFS+' -volname "$VOL" && \
|
---|
25 | MOUNT=`hdiutil attach "$DMG"` && \
|
---|
26 | DISK=`echo "$MOUNT" | sed -ne ' s|^/dev/\([^ ]*\).*$|\1|p'` && \
|
---|
27 | MOUNTPOINT=`echo "$MOUNT" | sed -ne 's|^.*\(/Volumes/.*\)$|\1|p'` && \
|
---|
28 | ditto -rsrc "$DSTROOT" "$MOUNTPOINT" && \
|
---|
29 | sudo chmod -R a+rX,u+w "$MOUNTPOINT" && \
|
---|
30 | # openUp "$MOUNTPOINT" && \
|
---|
31 | hdiutil detach $DISK && \
|
---|
32 | hdiutil convert "$DMG" -format UDZO -imagekey zlib-level=9 -o "z$DMG" && \
|
---|
33 | mv "z$DMG" "$DMG" && \
|
---|
34 | hdiutil internet-enable "$DMG" && \
|
---|
35 | scp "$DMG" ainaz:web/nriley/software/
|
---|
Note:
See
TracBrowser
for help on using the repository browser.