Skip to content

Commit

Permalink
Recipe for downloading FreeRuler. Lion no longer provides a FreeRuler.
Browse files Browse the repository at this point in the history
  • Loading branch information
Winston Teo committed Jul 10, 2012
1 parent e0c2c97 commit 300fd28
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
2 changes: 2 additions & 0 deletions attributes/freeruler.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node.default["freeruler_download_uri"] = "http://www.pascal.com/software/freeruler/FreeRuler1.7b5.zip"
node.default["freeruler_app_path"] = "/Applications/Free Ruler 1.7b5.app"
21 changes: 21 additions & 0 deletions recipes/freeruler.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
unless File.exists?(node["freeruler_app_path"])

remote_file "#{Chef::Config[:file_cache_path]}/FreeRuler1.7b5.zip" do
source node["freeruler_download_uri"]
owner WS_USER
end

execute "unzip FreeRuler to /Applications" do
command "unzip -o #{Chef::Config[:file_cache_path]}/FreeRuler1.7b5.zip -x __MACOSX* -d /Applications/"
user WS_USER
# This is required to unzip into Applications
group "admin"
end

ruby_block "test to see if FreeRuler was installed" do
block do
raise "FreeRuler install failed" unless File.exists?(node["freeruler_app_path"])
end
end

end

0 comments on commit 300fd28

Please sign in to comment.