#!/bin/sh -x function makeDMG() { export backgroundPictureName=background.png export applicationName=QCG-Icon export title=QCG-Icon echo ' tell application "Finder" tell disk "'${title}'" open do shell script "/Applications/Xcode.app/Contents/Developer/Tools/SetFile -a v " & "'/Volumes/'" & "'${title}'" & "'/${backgroundPictureName}'" #do shell script "/Developer/Tools/SetFile -a v " & "'/Volumes/'" & "'${title}'" & "'/${backgroundPictureName}'" set current view of container window to icon view set toolbar visible of container window to false set statusbar visible of container window to false set the bounds of container window to {400, 100, 1100, 500} set theViewOptions to the icon view options of container window set arrangement of theViewOptions to not arranged set icon size of theViewOptions to 96 -- set background picture of theViewOptions to POSIX file ("'/Volumes/'" & "'${title}'" & "'/${backgroundPictureName}'") as alias set background picture of theViewOptions to file "'${backgroundPictureName}'" set position of item "'${applicationName}'" of container window to {180, 190} set position of item "Applications" of container window to {525, 190} close open update without registering applications delay 5 do shell script "/Applications/Xcode.app/Contents/Developer/Tools/SetFile -a V " & "'/Volumes/'" & "'${title}'" & "'/${backgroundPictureName}'" #do shell script "/Developer/Tools/SetFile -a V " & "'/Volumes/'" & "'${title}'" & "'/${backgroundPictureName}'" eject end tell end tell ' | osascript #make new alias file at container window to POSIX file "/Applications" with properties {name:"Applications"} } if [ -d /Volumes/QCG-Icon/ ] then echo "/Volumes/QCG-Icon/ exists" exit 4 fi if ! diff -x .svn -r libs dist_macosx/QCG-Icon.app/Contents/Resources/Java/lib then echo "libs inconsistency" # exit 4 fi echo "Updating from svn..." svn up ant bundle cp -r dist_macosx/resources/* dist_macosx/QCG-Icon.app/Contents/Resources open dist_macosx/dmg/QCG-Icon.dmg sleep 10 rm -rf /Volumes/QCG-Icon/QCG-Icon.app ls -la /Volumes/QCG-Icon/ cp -rf dist_macosx/QCG-Icon.app /Volumes/QCG-Icon/ find /Volumes/QCG-Icon/ -name .svn -exec rm -rf {} \; makeDMG umount /Volumes/QCG-Icon open /Applications/Utilities/Disk\ Utility.app