Signed-off-by: morganamilo <morganamilo@gmail.com> --- src/bacman.sh.in | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bacman.sh.in b/src/bacman.sh.in index ca7c9c8..4e93a38 100644 --- a/src/bacman.sh.in +++ b/src/bacman.sh.in @@ -137,12 +137,12 @@ if (( EUID )); then fi # Source environmental variables and specify fallbacks -if [[ ! -r @sysconfdir@/pacman.conf ]]; then - error "unable to read @sysconfdir@/pacman.conf" - exit 1 +if ! DBPath="$(pacman-conf DBPath)"; then + error "unable to read @sysconfdir@/pacman.conf" + exit 1 fi -eval $(awk '/DBPath/ {print $1$2$3}' @sysconfdir@/pacman.conf) -pac_db="${DBPath:-@localstatedir@/lib/pacman/}/local" +pac_db="${DBPath:-@localstatedir@/lib/pacman}/local" + if [[ ! -r @sysconfdir@/makepkg.conf ]]; then error "unable to read @sysconfdir@/makepkg.conf" exit 1 -- 2.17.1