diff --git a/contrib/release/debian-packages.sh b/contrib/release/debian-packages.sh --- a/contrib/release/debian-packages.sh +++ b/contrib/release/debian-packages.sh @@ -11,9 +11,10 @@ echo "Build and sign Debian packages and push to a PPA." echo "Usage: $0 signer" echo - echo "Example usage: $0 \"Jason B. Cox \"" + echo "Example usage: $0 jasonbcox" echo - echo "signer must be of the form: 'YOUR NAME '" + echo "signer will be fetched from gpg, so must at least partially match your" + echo " signing name or email." echo echo "Note: This script will prompt you to sign with your PGP key." echo @@ -88,14 +89,8 @@ exit 20 fi -SIGNER="$1" -echo "Signer:" -echo "${SIGNER}" | grep ".* <.*@.*>" || { - echo "Error: signer is not formatted correctly" - echo - help_message - exit 21 -} +SIGNER=$(gpg --list-key "$1" | grep -o "\[ultimate\] .* <.*@.*>" | cut -d' ' -f 2-) +echo "Signer: ${SIGNER}" # Generate default dput config file if none exists if [ ! -f ${DPUT_CONFIG_FILE} ]; then