mirror of
https://github.com/etlegacy/Update-Installer.git
synced 2024-11-21 19:31:49 +00:00
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:
parent
21dd167d8b
commit
3cce9d3058
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue