X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/0c78091245e5299e4856bf696edd9a5d44e3e4c7..4b03c18aff06d5f34a587fd90af9af0f528e4c61:/cookbooks/wordpress/resources/theme.rb?ds=inline diff --git a/cookbooks/wordpress/resources/theme.rb b/cookbooks/wordpress/resources/theme.rb index 5a402f6d1..2c4ceda4e 100644 --- a/cookbooks/wordpress/resources/theme.rb +++ b/cookbooks/wordpress/resources/theme.rb @@ -52,6 +52,22 @@ action :create do user node[:wordpress][:user] group node[:wordpress][:group] end + elsif theme_repository.end_with?(".zip") + zip_path = "#{Chef::Config[:file_cache_path]}/#{new_resource.theme}.zip" + + remote_file zip_path do + source theme_repository + action :create + end + + archive_file zip_path do + destination theme_directory + action :nothing + overwrite true + group node[:wordpress][:group] + owner node[:wordpress][:user] + subscribes :extract, "remote_file[#{zip_path}]", :immediately + end else subversion theme_directory do action :sync