infochimps-labs/ironfan — Issue #106: bash "unpack" executes on every chef run in install_from_release provider
Author: bryanwb
Created: 2012-02-21 06:54:21+00:00
State: open

https://github.com/infochimps-labs/ironfan-pantry/blob/master/cookbooks/install_from/providers/release.rb#L57

It should do something like this
https://github.com/bryanwb/cookbooks/blob/10662fd16ccafe8fc76d47336e90e836192db14f/ark/providers/default.rb#L61
ruby_block "unpack #{new_resource.name} release" do
block do
if Dir["#{new_resource.install_dir}/*"].empty? ||
( !!new_resource.stop_file && File.exist?(new_resource.stop_file))
not_yet_extracted = true
else
not_yet_extracted = false
end
!!Dir[#{new_resource.install_dir}/*].empty? ||
( !!new_resource.stop_file && File.exist?(new_resource.stop_file))
eval new_resource.expand_cmd
end
only_if { not_yet_extracted }
end