diff options
Diffstat (limited to 'scripts/pacman-optimize.sh.in')
-rw-r--r-- | scripts/pacman-optimize.sh.in | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/pacman-optimize.sh.in b/scripts/pacman-optimize.sh.in index 78b2345b..2404291e 100644 --- a/scripts/pacman-optimize.sh.in +++ b/scripts/pacman-optimize.sh.in @@ -1,4 +1,4 @@ -#!/bin/bash +#!@BASH_SHELL@ # # pacman-optimize # @configure_input@ @@ -25,7 +25,9 @@ export TEXTDOMAIN='pacman' export TEXTDOMAINDIR='@localedir@' myver='@PACKAGE_VERSION@' -dbroot='@localstatedir@/lib/pacman/' + +eval $(awk '/DBPath/ {print $1$2$3}' @sysconfdir@/pacman.conf) +dbroot="${DBPath:-@localstatedir@/lib/pacman/}" msg() { local mesg=$1; shift @@ -99,7 +101,7 @@ if ! type diff >/dev/null 2>&1; then die "$(gettext "diff tool was not found, please install diffutils.")" fi -if [[ ! -d $dbroot ]]; then +if [[ ! -d $dbroot || ! -d $dbroot/local ]]; then die "$(gettext "%s does not exist or is not a directory.")" "$dbroot" fi |