Skip to content

Instantly share code, notes, and snippets.

@btm
Created January 5, 2012 19:48
Show Gist options
  • Select an option

  • Save btm/1566868 to your computer and use it in GitHub Desktop.

Select an option

Save btm/1566868 to your computer and use it in GitHub Desktop.
# this?
files = %{one.txt two.txt}
files.each do |filename|
execute "touch #{filename}" do
command "touch /tmp/#{filename}"
not_if "ls /tmp/#{filename}"
end
end
# http://tickets.opscode.com/browse/CHEF-2812
files = %w(one.txt two.txt)
files.each do |filename|
execute "touch_file" do
command "touch /tmp/#{filename}"
# It works without this 'not_if'
not_if "ls /tmp/#{filename}"
end
end
execute "ls_file" do
command "ls /tmp/two.txt"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment