Skip to content

Commit

Permalink
Portability fix for calculating package SHA sums
Browse files Browse the repository at this point in the history
Use Digest::SHA1 from the standard library instead of shelling
out to the 'sha1sum' utility which is named shasum under OS X
  • Loading branch information
Robert Knight committed May 19, 2014
1 parent 21dd167 commit 3cce9d3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/create-packages.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/ruby

require 'digest/sha1'
require 'fileutils'
require 'rubygems'
require 'find'
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3cce9d3

Please sign in to comment.