Skip to content

Instantly share code, notes, and snippets.

@richo
Created February 10, 2014 03:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richo/8909950 to your computer and use it in GitHub Desktop.
Save richo/8909950 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
#
require 'json'
require 'digest/sha1'
paths = {}
Dir["**/*"].each do |f|
if File.file? f
paths[f] = Digest::SHA1.new.update(File.read(f)).hexdigest
end
end
puts paths.to_json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment