aboutsummaryrefslogtreecommitdiff
path: root/contrib/verify-commits/gpg.sh
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2016-05-20 18:29:15 -0700
committerPeter Todd <pete@petertodd.org>2016-05-21 11:26:06 +0200
commitf7d4a25fe6b1bd52e70fa0779d1cd145f32bd2ab (patch)
treec3e6e8fbd426fc3b010de31abf15ff77688f7579 /contrib/verify-commits/gpg.sh
parent7771aa57bdd606a3b9b9020b59da9ff8832860b6 (diff)
Make verify-commits POSIX-compliant
Diffstat (limited to 'contrib/verify-commits/gpg.sh')
-rwxr-xr-xcontrib/verify-commits/gpg.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/verify-commits/gpg.sh b/contrib/verify-commits/gpg.sh
index 0218b82e11..375d711725 100755
--- a/contrib/verify-commits/gpg.sh
+++ b/contrib/verify-commits/gpg.sh
@@ -1,8 +1,9 @@
#!/bin/sh
-INPUT=$(</dev/stdin)
+INPUT=$(cat /dev/stdin)
VALID=false
REVSIG=false
-IFS=$'\n'
+IFS='
+'
for LINE in $(echo "$INPUT" | gpg --trust-model always "$@" 2>/dev/null); do
case "$LINE" in
"[GNUPG:] VALIDSIG "*)
@@ -13,10 +14,9 @@ for LINE in $(echo "$INPUT" | gpg --trust-model always "$@" 2>/dev/null); do
"[GNUPG:] REVKEYSIG "*)
[ "$BITCOIN_VERIFY_COMMITS_ALLOW_REVSIG" != 1 ] && exit 1
while read KEY; do
- case "$LINE" in "[GNUPG:] REVKEYSIG ${KEY:24:40} "*)
+ case "$LINE" in "[GNUPG:] REVKEYSIG ${KEY#????????????????????????} "*)
REVSIG=true
- GOODREVSIG="[GNUPG:] GOODSIG ${KEY:24:40} "
- ;;
+ GOODREVSIG="[GNUPG:] GOODSIG ${KEY#????????????????????????} "
esac
done < ./contrib/verify-commits/trusted-keys
;;