This repository has been archived by the owner on Mar 24, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Pivotal Labs
committed
Jul 26, 2011
1 parent
b957b56
commit c6bb7b3
Showing
3 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters