cog/Frameworks/Sparkle/sign_update.rb

7 lines
257 B
Ruby
Raw Normal View History

2013-10-22 02:17:51 +00:00
#!/usr/bin/ruby
if ARGV.length < 2
puts "Usage: ruby sign_update.rb update_archive private_key"
exit
end
openssl = "/usr/bin/openssl"
puts `#{openssl} dgst -sha1 -binary < "#{ARGV[0]}" | #{openssl} dgst -dss1 -sign "#{ARGV[1]}" | #{openssl} enc -base64`