Merge pull request #5486
[bitcoinplatinum.git] / contrib / verify-commits / gpg.sh
blob6b5137e7b54e545f4ea2211009b1b3e65bebf304
1 #!/bin/sh
2 INPUT=$(</dev/stdin)
3 VALID=false
4 IFS=$'\n'
5 for LINE in $(echo "$INPUT" | gpg --trust-model always "$@" 2>/dev/null); do
6 case "$LINE" in "[GNUPG:] VALIDSIG"*)
7 while read KEY; do
8 case "$LINE" in "[GNUPG:] VALIDSIG $KEY "*) VALID=true;; esac
9 done < ./contrib/verify-commits/trusted-keys
10 esac
11 done
12 if ! $VALID; then
13 exit 1
15 echo "$INPUT" | gpg --trust-model always "$@" 2>/dev/null