Skip to content

Instantly share code, notes, and snippets.

@lancelakey
Created July 16, 2013 06:13
Show Gist options
  • Save lancelakey/6006191 to your computer and use it in GitHub Desktop.
Save lancelakey/6006191 to your computer and use it in GitHub Desktop.
Upload all Berkshelf dependencies in all subdirectories to a Chef server.
#!/usr/bin/env ruby
require 'pathname'
require 'pp'
Dir.glob("**/Berksfile") do |bf|
bd = Pathname.new("#{bf}").dirname.to_path
result = %x( cd #{bd} ; berks upload )
pp result
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment