Sha256: b049cd4f5ec18481d3b7237d115eb71920385fe7945f5ae063aa411846f5d1d4

Contents?: true

Size: 1.47 KB

Versions: 26

Compression:

Stored size: 1.47 KB

Contents

# find disks that start with <%= volume_name %>
set found_disk to do shell script "ls /Volumes/ | grep '<%= volume_name %>*'"

if found_disk is {} then
	set errormsg to "Disk " & found_disk & " not found"
	error errormsg
end if

tell application "Finder"
	# In case finder has been closed somehow
	reopen
	# Reactivate it in case it is "out of focus"
	activate
	# Deactivate any current selections
	set selection to {}
	# Set it to the location of the proper volume
	set target of Finder window 1 to found_disk
	# We like icons
	set current view of Finder window 1 to icon view
	# No toolbar or statusbar
	set toolbar visible of Finder window 1 to false
	set statusbar visible of Finder window 1 to false
	# How big and where does it live on the desktop
	set the bounds of Finder window 1 to {<%= window_bounds %>}
  # We now talk to the disk object that is a subset of the "Finder"
  tell disk found_disk
  	# Pull the view options from the Icon View object
    # The container window is how we grab hold of the "Finder" window in the
    # context of the disk object (the disk object is a sub-thing of the app)
  	set theViewOptions to the icon view options of container window
    set background picture of theViewOptions to file ".support:background.png"
  	set arrangement of theViewOptions to not arranged
  	set icon size of theViewOptions to 72
  	set position of item "<%= pkg_name %>" of container window to {<%= pkg_position %>}
  	update without registering applications
  end tell
end tell

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
omnibus-9.0.24 resources/dmg/create_dmg.osascript.erb
omnibus-9.0.23 resources/dmg/create_dmg.osascript.erb
omnibus-9.0.22 resources/dmg/create_dmg.osascript.erb
omnibus-9.0.17 resources/dmg/create_dmg.osascript.erb
omnibus-9.0.12 resources/dmg/create_dmg.osascript.erb
omnibus-9.0.11 resources/dmg/create_dmg.osascript.erb
omnibus-9.0.8 resources/dmg/create_dmg.osascript.erb
omnibus-8.3.2 resources/dmg/create_dmg.osascript.erb
omnibus-8.2.2 resources/dmg/create_dmg.osascript.erb
omnibus-8.1.15 resources/dmg/create_dmg.osascript.erb
omnibus-8.0.15 resources/dmg/create_dmg.osascript.erb
omnibus-8.0.9 resources/dmg/create_dmg.osascript.erb
omnibus-7.0.34 resources/dmg/create_dmg.osascript.erb
omnibus-7.0.13 resources/dmg/create_dmg.osascript.erb
omnibus-7.0.12 resources/dmg/create_dmg.osascript.erb
omnibus-6.1.9 resources/dmg/create_dmg.osascript.erb
omnibus-6.1.7 resources/dmg/create_dmg.osascript.erb
omnibus-6.1.4 resources/dmg/create_dmg.osascript.erb
omnibus-6.0.30 resources/dmg/create_dmg.osascript.erb
omnibus-6.0.25 resources/dmg/create_dmg.osascript.erb