Created
July 26, 2016 14:11
-
-
Save ehelms/3fd956ee887db3d7bac20b29efa3dd51 to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/env ruby | |
Dir.chdir("#{ARGV[0]}") do | |
if File.exist?("PULP_MANIFEST") | |
`rm -rf PULP_MANIFEST` | |
end | |
files = Dir.glob("**/*") | |
lines = files.collect do |file| | |
next if File.directory?(file) | |
line = [] | |
line << file | |
line << `sha256sum #{file}`.split(' ')[0] | |
line << `stat -c "%s" #{file}` | |
line.join(',') | |
end | |
File.open("PULP_MANIFEST", 'w') do |file| | |
file.write(lines.join("")) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment