PageRenderTime 72ms CodeModel.GetById 30ms app.highlight 3ms RepoModel.GetById 38ms app.codeStats 0ms

/admin/mac/sign_bundle.rb

http://github.com/tomahawk-player/tomahawk
Ruby | 14 lines | 13 code | 0 blank | 1 comment | 1 complexity | 09d981781003f58bbbe7c71de6aec4d0 MD5 | raw file
 1#!/usr/bin/ruby
 2if ARGV.length < 2
 3  puts "Usage: ruby sign_update.rb version private_key_file"
 4  puts "\nCall this from the build directory."
 5  puts "If you don't have the tomahawk private key and you think you should, ask leo :)"
 6  exit
 7end
 8
 9tarball = "#{ARGV[0].downcase}-#{ARGV[1]}.tar.bz2"
10puts "Zipping: #{tarball}..."
11`tar jcvf "#{tarball}" #{ARGV[0]}.app`
12
13puts "Signing..."
14puts `openssl dgst -sha1 -binary < "#{tarball}" | openssl dgst -dss1 -sign "#{ARGV[2]}" | openssl enc -base64`