diff options
author | Matt Corallo <git@bluematt.me> | 2014-10-27 00:07:25 -0700 |
---|---|---|
committer | Matt Corallo <git@bluematt.me> | 2014-12-20 00:39:42 -0500 |
commit | adaa568722e59cde510c5fe1997c49cbb9d7db12 (patch) | |
tree | d392d4c3467c229e54d19c835c9bd497e6917aff /contrib/verify-commits/gpg.sh | |
parent | 13c077c7cfe9f367c721f3d99924b3d568afb4d0 (diff) | |
download | bitcoin-adaa568722e59cde510c5fe1997c49cbb9d7db12.tar.xz |
Add script to verify all merge commits are signed
Diffstat (limited to 'contrib/verify-commits/gpg.sh')
-rwxr-xr-x | contrib/verify-commits/gpg.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/contrib/verify-commits/gpg.sh b/contrib/verify-commits/gpg.sh new file mode 100755 index 0000000000..6b5137e7b5 --- /dev/null +++ b/contrib/verify-commits/gpg.sh @@ -0,0 +1,15 @@ +#!/bin/sh +INPUT=$(</dev/stdin) +VALID=false +IFS=$'\n' +for LINE in $(echo "$INPUT" | gpg --trust-model always "$@" 2>/dev/null); do + case "$LINE" in "[GNUPG:] VALIDSIG"*) + while read KEY; do + case "$LINE" in "[GNUPG:] VALIDSIG $KEY "*) VALID=true;; esac + done < ./contrib/verify-commits/trusted-keys + esac +done +if ! $VALID; then + exit 1 +fi +echo "$INPUT" | gpg --trust-model always "$@" 2>/dev/null |