index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2010-12-12 21:40:24 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-12-12 21:42:54 -0600 |
commit | 13a2847aa14cb7643d50ca82b00180b440e401fe (patch) | |
tree | 2d1ad9a7b62572bca9c8dcd89fede929a7babc10 /scripts | |
parent | d98bacd4ec4289750e740b2dff8c4adaaa7a028a (diff) |
-rw-r--r-- | scripts/pacman-optimize.sh.in | 6 |
diff --git a/scripts/pacman-optimize.sh.in b/scripts/pacman-optimize.sh.in index f4642abf..2404291e 100644 --- a/scripts/pacman-optimize.sh.in +++ b/scripts/pacman-optimize.sh.in @@ -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 |