Bläddra i källkod

Make gpg be quiet if -q is set.

pull/5/head
Matt Corallo 11 år sedan
förälder
incheckning
9096469e67
  1. 12
      bin/gverify

12
bin/gverify

@ -78,13 +78,23 @@ Dir.foreach(release_path) do |signer_dir| @@ -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']

Laddar…
Avbryt
Spara