handle gnupg 2.1.x public keyring

This commit is contained in:
Christian Hesse 2015-01-17 00:06:24 +01:00 committed by Dave Reisner
parent 33fda4e8ff
commit 4a9ecdfe15
1 changed files with 5 additions and 4 deletions

View File

@ -153,10 +153,11 @@ prepare_chroot() {
echo 'BUILDDIR="/build"' >> "$copydir/etc/makepkg.conf"
fi
# Read .makepkg.conf and .gnupg/pubring.gpg even if called via sudo
if [[ -r "$USER_HOME/.gnupg/pubring.gpg" ]]; then
install -D "$USER_HOME/.gnupg/pubring.gpg" \
"$copydir/build/.gnupg/pubring.gpg"
# Read .makepkg.conf and gnupg pubring
if [[ -r $USER_HOME/.gnupg/pubring.kbx ]]; then
install -D "$USER_HOME/.gnupg/pubring.kbx" "$copydir/build/.gnupg/pubring.kbx"
elif [[ -r $USER_HOME/.gnupg/pubring.gpg ]]; then
install -D "$USER_HOME/.gnupg/pubring.gpg" "$copydir/build/.gnupg/pubring.gpg"
fi
mkdir -p "$copydir/pkgdest"