mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-23 00:08:50 -05:00
pacman-key: tidy up logic for finding pacman keyring directory
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
df7b390514
commit
0be9e4a4cd
@ -300,11 +300,9 @@ if [[ ! -r "${CONFIG}" ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get GPGDIR from pacman.conf iff not specified on command line
|
# if PACMAN_KEYRING_DIR isn't assigned, try to get it from the config
|
||||||
if [[ -z PACMAN_KEYRING_DIR && GPGDIR="$(get_from "$CONFIG" "GPGDir")" == 0 ]]; then
|
# file, falling back on a hard default
|
||||||
PACMAN_KEYRING_DIR="${GPGDIR}"
|
PACMAN_KEYRING_DIR=${PACMAN_KEYRING_DIR:-$(get_from "$CONFIG" "GPGDir" || echo "@sysconfdir@/pacman.d/gnupg")}
|
||||||
fi
|
|
||||||
PACMAN_KEYRING_DIR=${PACMAN_KEYRING_DIR:-@sysconfdir@/pacman.d/gnupg}
|
|
||||||
|
|
||||||
# Try to create $PACMAN_KEYRING_DIR if non-existent
|
# Try to create $PACMAN_KEYRING_DIR if non-existent
|
||||||
# Check for simple existence rather than for a directory as someone may want
|
# Check for simple existence rather than for a directory as someone may want
|
||||||
|
Loading…
Reference in New Issue
Block a user