Created
October 27, 2015 21:55
-
-
Save xrl/82e68db6537b5fcdbfa8 to your computer and use it in GitHub Desktop.
Poor man's diff utility
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'pp' | |
here = Dir.glob("logstash/conf.d/*") | |
there = Dir.glob("../cookbooks/cookbooks/forwarder/templates/default/elasticsearch/*.erb") | |
pp here.collect{|h| h = h.split("/").last; match = there.select{|t| t.include?(h); }; [h,match] }.collect{|h,t| "diff logstash/conf.d/#{h} #{t.first}"}.each{|x| puts x; system(x)}; nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment