Permalink
Browse files

Added recipe for installing BetterTouchTool

  • Loading branch information...
1 parent 1c913ef commit 4b63e9d54049f6ab53c79e09dd965ff6e6df66d4 Colin Deeb and Ryan Spore committed with Colin Deeb Dec 12, 2012
Showing with 22 additions and 0 deletions.
  1. +2 −0 attributes/bettertouchtool.rb
  2. +19 −0 recipes/bettertouchtool.rb
  3. +1 −0 recipes/meta_osx_base.rb
View
2 attributes/bettertouchtool.rb
@@ -0,0 +1,2 @@
+node.default["bettertouchtool_download_uri"] = "http://www.boastr.de/BetterTouchTool.zip"
+node.default["bettertouchtool_app_path"] = "/Applications/BetterTouchTool.app"
View
19 recipes/bettertouchtool.rb
@@ -0,0 +1,19 @@
+remote_file "#{Chef::Config[:file_cache_path]}/BetterTouchTool.zip" do
+ source node["bettertouchtool_download_uri"]
+ owner WS_USER
+ action :create_if_missing
+end
+
+execute "unzip BetterTouchTool to /Applications" do
+ command "unzip -o #{Chef::Config[:file_cache_path]}/BetterTouchTool.zip -x __MACOSX* -d /Applications/"
+ user WS_USER
+ not_if { File.exists?(node["bettertouchtool_app_path"]) }
+ # This is required to unzip into Applications
+ group "admin"
+end
+
+ruby_block "test to see if BetterTouchTool was installed" do
+ block do
+ raise "BetterTouchTool install failed" unless File.exists?(node["bettertouchtool_app_path"])
+ end
+end
View
1 recipes/meta_osx_base.rb
@@ -16,3 +16,4 @@
include_recipe "pivotal_workstation::mouse_locator"
include_recipe "pivotal_workstation::defaults_fast_key_repeat_rate"
include_recipe "pivotal_workstation::menumeters"
+include_recipe "pivotal_workstation::bettertouchtool"

0 comments on commit 4b63e9d

Please sign in to comment.