From 05f0a28932c1acab7a9ddb58435d69626dad54da Mon Sep 17 00:00:00 2001 From: Nezmer Date: Tue, 12 Oct 2010 02:23:16 +0300 Subject: 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 Signed-off-by: Dan McGee --- contrib/pactree.in | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'contrib/pactree.in') diff --git a/contrib/pactree.in b/contrib/pactree.in index 6051724e..29c6af6c 100755 --- a/contrib/pactree.in +++ b/contrib/pactree.in @@ -1,4 +1,4 @@ -#!/bin/bash +#!@BASH@ # pactree : a simple dependency tree viewer # # Copyright (C) 2008 Carlo "carlocci" Bersani @@ -272,14 +272,14 @@ if [ $graphviz -eq 1 ]; then fi fi -if [ ! -r /etc/pacman.conf ]; then - echo "ERROR: unable to read /etc/pacman.conf" +if [ ! -r @sysconfdir@/pacman.conf ]; then + echo "ERROR: unable to read @sysconfdir@/pacman.conf" exit 1 else - eval $(awk '/DBPath/ {print $1$2$3}' /etc/pacman.conf) + eval $(awk '/DBPath/ {print $1$2$3}' @sysconfdir@/pacman.conf) fi -pac_db="${DBPath:-/var/lib/pacman}/local" +pac_db="${DBPath:-@localstatedir@/lib/pacman}/local" if [ ! -d "$pac_db" ] ; then echo "ERROR: pacman database directory ${pac_db} not found" -- cgit v1.2.3-54-g00ecf