Changeset 361 for trunk/Cocoa/Pester/package-Pester.sh
- Timestamp:
- 11/25/07 03:01:04 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cocoa/Pester/package-Pester.sh
r116 r361 1 #!/bin/zsh 1 #!/bin/zsh -e 2 2 3 # set -x -v3 # set -x -v 4 4 5 5 PACKAGEDIR="$PWD" 6 6 PRODUCT="Pester" 7 7 8 cd "$PACKAGEDIR"/Source && \ 9 find . -name \*~\* -exec rm -r '{}' \; && \ 10 rm -f .gdb_history && \ 11 VERSION=`cat VERSION` && \ 12 DMG="$PRODUCT-$VERSION.dmg" VOL="$PRODUCT $VERSION" DSTROOT="$PACKAGEDIR/$VOL" && \ 13 sudo rm -fr "$DSTROOT" && \ 14 rm -rf build/ && \ 15 pbxbuild install "DSTROOT=$DSTROOT" && \ 16 rm -rf build/ && \ 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" && \ 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'` && \ 27 ditto -rsrc "$DSTROOT" "$MOUNTPOINT" && \ 28 chmod -R a+rX,u+w "$MOUNTPOINT" && \ 29 openUp "$MOUNTPOINT" && \ 30 hdiutil detach $DISK && \ 31 hdiutil resize -sectors min "$DMG" && \ 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/ && \ 36 cd "$PACKAGEDIR"/Source && \ 37 agvtool bump -all && \ 38 : 8 # gather information 9 cd "$PACKAGEDIR"/Source 10 VERSION=`cat VERSION` 11 BUILD=`agvtool vers -terse` 12 DMG="$PRODUCT-$VERSION.dmg" VOL="$PRODUCT $VERSION" 13 DSTROOT="$PACKAGEDIR/$VOL" 14 15 # clean and build 16 sudo rm -rf "$DSTROOT" 17 find . -name \*~ -exec rm '{}' \; 18 rm -rf build/ Sparkle/build/ 19 cd Sparkle 20 xcodebuild -target Sparkle -configuration Release 21 cd .. 22 xcodebuild -target Pester -configuration Release "DSTROOT=$DSTROOT" \ 23 DEPLOYMENT_LOCATION=YES install 24 rm -rf build/Release # or Xcode gets confused next time because of the symlink 25 find "$DSTROOT" \( -name ".svn" -or -name "Headers" \) \ 26 -exec sudo /bin/rm -rf "{}" \; || true 27 28 # create disk image 29 cd "$PACKAGEDIR" 30 rm -f $DMG 31 hdiutil create $DMG -megabytes 5 -ov -layout NONE -fs 'HFS+' -volname $VOL 32 MOUNT=`hdiutil attach $DMG` 33 DISK=`echo $MOUNT | sed -ne ' s|^/dev/\([^ ]*\).*$|\1|p'` 34 MOUNTPOINT=`echo $MOUNT | sed -ne 's|^.*\(/Volumes/.*\)$|\1|p'` 35 ditto -rsrc "$DSTROOT" "$MOUNTPOINT" 36 chmod -R a+rX,u+w "$MOUNTPOINT" 37 hdiutil detach $DISK 38 hdiutil resize -sectors min $DMG 39 hdiutil convert $DMG -format UDBZ -o z$DMG 40 mv z$DMG $DMG 41 hdiutil internet-enable $DMG 42 zmodload zsh/stat 43 SIZE=$(stat -L +size $DMG) 44 45 # update Web presence 46 DIGEST=`openssl dgst -sha1 -binary < $DMG | openssl dgst -dss1 -sign ~/Documents/Development/DSA/dsa_priv.pem | openssl enc -base64` 47 perl -pi -e 's|(<enclosure url=".+'$DMG'").+/>|\1 length="'$SIZE'" type="application/x-apple-diskimage" sparkle:version="'$BUILD'" sparkle:shortVersionString="'$VERSION'" sparkle:dsaSignature="'$DIGEST'"/>|' Updates/updates.xml 48 scp $DMG ainaz:web/nriley/software/ 49 ssh ainaz chmod go+r web/nriley/software/$DMG 50 rsync -avz --exclude='.*' Updates/ ainaz:web/nriley/software/$PRODUCT/ 51 cd "$PACKAGEDIR"/Source 52 # agvtool bump -all 53
Note:
See TracChangeset
for help on using the changeset viewer.