diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2014-10-01 03:16:30 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2014-10-01 03:16:30 -0400 |
commit | 9b6b6dad291e2d62a957a38ace952d98147a83d2 (patch) | |
tree | 1e3e37af8a9d693d0cb749999aaaef095bb7876c /src/lib | |
parent | 051a269d2ff56d5ab01301c965a7f7d0799bc441 (diff) |
conf.sh: don't hardcode /etc, get it during build from $(sysconfdir)
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/.gitignore | 1 | ||||
-rw-r--r-- | src/lib/Makefile | 2 | ||||
-rw-r--r-- | src/lib/conf.sh.in (renamed from src/lib/conf.sh) | 12 |
3 files changed, 8 insertions, 7 deletions
diff --git a/src/lib/.gitignore b/src/lib/.gitignore index 9a0c402..e769566 100644 --- a/src/lib/.gitignore +++ b/src/lib/.gitignore @@ -1,3 +1,4 @@ common.sh common.sh.in common.sh.top +conf.sh diff --git a/src/lib/Makefile b/src/lib/Makefile index 5226dda..97b30eb 100644 --- a/src/lib/Makefile +++ b/src/lib/Makefile @@ -2,7 +2,7 @@ copy_files = common.sh.in libexecs = $(filter-out librelib,$(progs)) # include common.sh in libs explicitly, because it might not exist yet # when the wildcard is performed -libs = $(sort $(wildcard *.sh) common.sh) +libs = $(sort $(wildcard *.sh) common.sh conf.sh) include ../../common.mk diff --git a/src/lib/conf.sh b/src/lib/conf.sh.in index 3c4234f..fa66016 100644 --- a/src/lib/conf.sh +++ b/src/lib/conf.sh.in @@ -40,27 +40,27 @@ list_files() { local slug=$1 case $slug in abs) - echo /etc/$slug.conf + echo @sysconfdir@/$slug.conf echo "$LIBREHOME/.$slug.conf" ;; makepkg) - if [[ ${MAKEPKG_CONF:-} != /etc/$slug.conf && -r ${MAKEPKG_CONF:-} ]]; then + if [[ ${MAKEPKG_CONF:-} != @sysconfdir@/$slug.conf && -r ${MAKEPKG_CONF:-} ]]; then echo "$MAKEPKG_CONF" else - echo /etc/$slug.conf + echo @sysconfdir@/$slug.conf echo "$LIBREHOME/.$slug.conf" fi ;; xbs*) - echo /etc/xbs/$slug.conf + echo @sysconfdir@/xbs/$slug.conf echo "$XDG_CONFIG_HOME/xbs/$slug.conf" ;; libretools) - echo /etc/$slug.conf + echo @sysconfdir@/$slug.conf echo "$XDG_CONFIG_HOME/libretools/$slug.conf" ;; *) - echo /etc/libretools.d/$slug.conf + echo @sysconfdir@/libretools.d/$slug.conf echo "$XDG_CONFIG_HOME/libretools/$slug.conf" ;; esac |