Skip to content
This repository has been archived by the owner on Mar 24, 2022. It is now read-only.

Commit

Permalink
Added LibreOffice.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pivotal Labs committed Jul 26, 2011
1 parent b957b56 commit c6bb7b3
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
3 changes: 3 additions & 0 deletions attributes/libreoffice.rb
@@ -0,0 +1,3 @@
node.default["libreoffice_download_uri"]="http://download.documentfoundation.org/libreoffice/stable/3.3.3/mac/x86/LibO_3.3.3_MacOS_x86_install_en-US.dmg"
node.default["libreoffice_dmg_mnt"]="/Volumes/LibreOffice 3.3"
node.default["libreoffice_basename"]="LibreOffice.app"
28 changes: 28 additions & 0 deletions recipes/libreoffice.rb
@@ -0,0 +1,28 @@
unless File.exists?("/Applications/" + node["libreoffice_basename"])

remote_file "/tmp/libreoffice.dmg" do
source node["libreoffice_download_uri"]
mode "0644"
end

execute "mount libreoffice dmg" do
command "hdid /tmp/libreoffice.dmg"
user WS_USER
end

execute "copy LibreOffice to /Applications" do
command "cp -rf #{Regexp.escape(node["libreoffice_dmg_mnt"]+ "/" + node["libreoffice_basename"])} /Applications/"
user WS_USER
end

execute "unmount dmg" do
command "hdiutil detach #{Regexp.escape(node["libreoffice_dmg_mnt"])}"
user WS_USER
end

ruby_block "test to see if LibreOffice was installed" do
block do
raise "LibreOffice install failed" unless File.exists?("/Applications/" + node["libreoffice_basename"])
end
end
end
1 change: 1 addition & 0 deletions recipes/lion_basedev.rb
Expand Up @@ -19,4 +19,5 @@
include_recipe "pivotal_workstation::textmate"
include_recipe "pivotal_workstation::textmate_set_defaults"
include_recipe "pivotal_workstation::fusion"
include_recipe "pivotal_workstation::libreoffice"
#include_recipe "pivotal_workstation::mysql" # broken

0 comments on commit c6bb7b3

Please sign in to comment.