Browse Source

Make gpg be quiet if -q is set.

tags/0.1
Matt Corallo 10 years ago
parent
commit
9096469e67
1 changed files with 11 additions and 1 deletions
  1. 11
    1
      bin/gverify

+ 11
- 1
bin/gverify View File

@@ -78,13 +78,23 @@ Dir.foreach(release_path) do |signer_dir|
result_path = sanitize_path(File.join(signer_path, result_file), "result path")
result = YAML.load_file(result_path)
system("gpg --keyserver pgp.mit.edu --recv-keys `gpg --quiet --batch --verify \"#{File.join(signer_path, 'signature.pgp')}\" \"#{result_path}\" 2>&1 | head -n1 | grep \"key ID\" | awk '{ print $15 }'` > /dev/null 2>&1")
if !system("gpg --quiet --batch --verify \"#{File.join(signer_path, 'signature.pgp')}\" \"#{result_path}\"")
out = `gpg --quiet --batch --verify \"#{File.join(signer_path, 'signature.pgp')}\" \"#{result_path}\" 2>&1`
if $? != 0
out.each do |line|
if line =~ /^gpg: Signature made/
info(line)
else
puts line
end
end
puts "#{signer_dir}: BAD SIGNATURE"
did_fail = true
elsif current_manifest and result['out_manifest'] != current_manifest
info(out)
puts "#{signer_dir}: MISMATCH"
did_fail = true
else
info(out)
puts "#{signer_dir}: OK"
end
current_manifest = result['out_manifest']

Loading…
Cancel
Save