summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-01-04 15:25:38 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-01-04 15:25:38 -0500
commitec4223a6a689b341bf4a60c3e7eb0e6211b0e5f3 (patch)
tree4a88742ff4bbdf7aa874c5763c3600eb5a1883ea
parentbd9e8f3d19098563f4798553176d3e3ab9b50b04 (diff)
Found a mistake in librefetch-install, use @pkgconfdir@ to avoid those types of errors
-rw-r--r--common.mk1
-rw-r--r--src/lib/conf.sh.in3
-rw-r--r--src/librefetch/librefetch-install.in2
-rwxr-xr-xtest/testenv1
4 files changed, 5 insertions, 2 deletions
diff --git a/common.mk b/common.mk
index 53be7cc..5a79f7a 100644
--- a/common.mk
+++ b/common.mk
@@ -13,6 +13,7 @@ edit = sed \
-e 's|^\#!\s*/bin/bash|\#!/usr/bin/env bash|' \
-e 's|m4_include(lib/\(.*\))|. "$$(librelib \1)"|' \
-e 's|@sysconfdir@|$(sysconfdir)|g' \
+ -e 's|@pkgconfdir@|$(pkgconfdir)|g' \
-e 's|@bindir@|$(bindir)|g'
# Usage: $(call indent,FILENAME)
diff --git a/src/lib/conf.sh.in b/src/lib/conf.sh.in
index 8042f8f..8305397 100644
--- a/src/lib/conf.sh.in
+++ b/src/lib/conf.sh.in
@@ -39,6 +39,7 @@ fi
list_files() {
local slug=$1
local sysconfdir=${_librelib_conf_sh_sysconfdir:-@sysconfdir@}
+ local pkgconfdir=${_librelib_conf_sh_pkgconfdir:-@pkgconfdir@}
case $slug in
abs)
echo "${sysconfdir}/$slug.conf"
@@ -71,7 +72,7 @@ list_files() {
echo "$XDG_CONFIG_HOME/libretools/$slug.conf"
;;
*)
- echo "${sysconfdir}/libretools.d/$slug.conf"
+ echo "${pkgconfdir}/$slug.conf"
echo "$XDG_CONFIG_HOME/libretools/$slug.conf"
;;
esac
diff --git a/src/librefetch/librefetch-install.in b/src/librefetch/librefetch-install.in
index 1a18757..34815a7 100644
--- a/src/librefetch/librefetch-install.in
+++ b/src/librefetch/librefetch-install.in
@@ -24,7 +24,7 @@ set -ueE
. "$(librelib messages)"
# This line should be installed
-new_code='. @sysconfdir@/libretools/librefetch-makepkg.conf # This line was added by librefetch-install'
+new_code='. @pkgconfdir@/librefetch-makepkg.conf # This line was added by librefetch-install'
# These lines were installed by previous versions of this script
old_code=(
diff --git a/test/testenv b/test/testenv
index 56b56fb..7072326 100755
--- a/test/testenv
+++ b/test/testenv
@@ -46,6 +46,7 @@ export HOME=$TMPDIR/home
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_CONFIG_HOME="$HOME/.config"
export _librelib_conf_sh_sysconfdir="$destdir/etc"
+export _librelib_conf_sh_pkgconfdir="$destdir/etc/libretools.d"
# Hack to respect our variables in sudo
_sudo() {