Skip to content

Commit

Permalink
recipe for github:mac - http://mac.github.com/
Browse files Browse the repository at this point in the history
  • Loading branch information
house9 committed Aug 17, 2011
1 parent c26544b commit dea6940
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
4 changes: 4 additions & 0 deletions attributes/github_for_mac.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# node.default["github_for_mac_download_uri"]="https://central.github.com/mac/latest"
# too bad latest is redirect to url with spaces in the name :(
node.default["github_for_mac_download_uri"]="https://github-central.s3.amazonaws.com/mac/GitHub%20for%20Mac%201.0.6.zip"
node.default["github_for_mac_app_path"]="/Applications/GitHub.app"
24 changes: 24 additions & 0 deletions recipes/github_for_mac.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
unless File.exists?(node["github_for_mac_app_path"])

remote_file "/tmp/github_for_mac.zip" do
source node["github_for_mac_download_uri"]
owner WS_USER
end

execute "unzip github_for_mac" do
command "unzip /tmp/github_for_mac.zip -d /tmp/"
user WS_USER
end

execute "copy github_for_mac to /Applications" do
command "mv /tmp/GitHub.app #{Regexp.escape(node["github_for_mac_app_path"])}"
user WS_USER
end

ruby_block "test to see if GitHub.app was installed" do
block do
raise "GitHub.app was not installed" unless File.exists?(node["github_for_mac_app_path"])
end
end

end

0 comments on commit dea6940

Please sign in to comment.