Portability fix for calculating package SHA sums

Use Digest::SHA1 from the standard library instead of shelling
out to the 'sha1sum' utility which is named shasum under OS X
This commit is contained in:
Robert Knight 2014-05-19 17:32:25 +01:00
parent 21dd167d8b
commit 3cce9d3058

View file

@ -1,5 +1,6 @@
#!/usr/bin/ruby
require 'digest/sha1'
require 'fileutils'
require 'rubygems'
require 'find'
@ -82,7 +83,7 @@ def strip_prefix(string,prefix)
end
def file_sha1(path)
return `sha1sum "#{path}"`.split(' ')[0]
Digest::SHA1.file(path).to_s
end
class UpdateScriptGenerator