Use GPGKEY to select signing key

Use the default key from the gpg keyring to sign packages unless
GPGKEY is specified (either in makepkg.conf or as an environmental
variable).

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
This commit is contained in:
Allan McRae 2011-04-17 22:51:23 +10:00 committed by Pierre Schmitz
parent fee49075f0
commit d187cdbc38
1 changed files with 4 additions and 1 deletions

View File

@ -132,7 +132,10 @@ for _arch in ${arch[@]}; do
if [[ $SIGNPKG == 'y' ]]; then
echo "Signing package ${pkgfile}..."
gpg --detach-sign --use-agent -u "${PACKAGER}" "${pkgfile}" || abort
if [[ -n $GPGKEY ]]; then
SIGNWITHKEY="-u ${GPGKEY}"
fi
gpg --detach-sign --use-agent ${SIGNWITHKEY} "${pkgfile}" || abort
fi
sigfile="${pkgfile}.sig"