summaryrefslogtreecommitdiffstats
path: root/contrib/pacscripts.in
diff options
context:
space:
mode:
authorNezmer <git@nezmer.info>2010-10-12 01:23:16 +0200
committerDan McGee <dan@archlinux.org>2010-10-12 03:29:22 +0200
commit05f0a28932c1acab7a9ddb58435d69626dad54da (patch)
tree86b901ee3ba6fc6ba6d7219de38e68d70d092742 /contrib/pacscripts.in
parentbce3c8efc7a2d187984aa0e7037307b99c217fd7 (diff)
downloadpacman-05f0a28932c1acab7a9ddb58435d69626dad54da.tar.gz
pacman-05f0a28932c1acab7a9ddb58435d69626dad54da.tar.xz
Use sysconfdir, localstatedir, BASH instead of hardcoded values
This applies to contrib/ files, our scripts, and the documentation. Dan: fix 'make clean' in contrib/ directory. Signed-off-by: Nezmer <git@nezmer.info> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'contrib/pacscripts.in')
-rwxr-xr-xcontrib/pacscripts.in8
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/pacscripts.in b/contrib/pacscripts.in
index 101fb15f..123c79df 100755
--- a/contrib/pacscripts.in
+++ b/contrib/pacscripts.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@BASH@
#
# pacscripts : tries to print out the {pre,post}_{install,remove,upgrade}
# scripts of a given package
@@ -27,7 +27,7 @@ set -o errexit
progname=$(basename $0)
progver="0.4"
-conf="/etc/pacman.conf"
+conf="@sysconfdir@/pacman.conf"
if [ ! -r "$conf" ]; then
echo "ERROR: unable to read $conf"
@@ -36,8 +36,8 @@ fi
eval $(awk '/DBPath/ {print $1$2$3}' "$conf")
eval $(awk '/CacheDir/ {print $1$2$3}' "$conf")
-pac_db="${DBPath:-/var/lib/pacman}/local"
-pac_cache="${CacheDir:-/var/cache/pacman/pkg}"
+pac_db="${DBPath:-@localstatedir@/lib/pacman}/local"
+pac_cache="${CacheDir:-@localstatedir@/cache/pacman/pkg}"
error() {
local mesg=$1; shift