Skip to content

Instantly share code, notes, and snippets.

@yfeldblum
Forked from patcon/chef-log.txt
Created April 11, 2012 23:44
Show Gist options
  • Select an option

  • Save yfeldblum/2363520 to your computer and use it in GitHub Desktop.

Select an option

Save yfeldblum/2363520 to your computer and use it in GitHub Desktop.
original_pear_version = nil
ruby_block "check_pear_version" do
block do
original_pear_version = %x[ pear -V 2>&1 ].match(/PEAR.*(\d+\.\d+\.\d+)/)[1]
original_pear_version = Gem::Version.create(original_pear_version)
end
end
declared_pear_version = Gem::Version.create("1.6.1")
php_pear "PEAR" do
version declared_pear_version.to_s
options "--force"
action :install
only_if { original_pear_version != declared_pear_version }
end
@yfeldblum
Copy link
Copy Markdown
Author

yfeldblum commented Apr 12, 2012 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment