tools: add support for subkeys in release tools

Replace grep with awk to add support for subkeys

PR-URL: https://github.com/nodejs/node/pull/4807
Reviewed-By: Rod Vagg <rod@vagg.org>
This commit is contained in:
Myles Borins 2016-01-21 14:31:41 -08:00 committed by Myles Borins
parent 57003520f8
commit 321162df71

View File

@ -20,7 +20,7 @@ signcmd=dist-sign
echo "# Selecting GPG key ..."
gpgkey=$(gpg --list-secret-keys | grep '^sec' | awk -F'( +|/)' '{print $3}')
gpgkey=$(gpg --list-secret-keys | awk -F'( +|/)' '/^(sec|ssb)/{print $3}')
keycount=$(echo $gpgkey | wc -w)
if [ $keycount -eq 0 ]; then