summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/conf.sh.in21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/lib/conf.sh.in b/src/lib/conf.sh.in
index 9bdb2cc..3ddef0b 100644
--- a/src/lib/conf.sh.in
+++ b/src/lib/conf.sh.in
@@ -45,11 +45,21 @@ list_files() {
echo "$LIBREHOME/.$slug.conf"
;;
makepkg)
- if [[ ${MAKEPKG_CONF:-} != ${sysconfdir}/$slug.conf && -r ${MAKEPKG_CONF:-} ]]; then
- echo "$MAKEPKG_CONF"
+ local manual="${MAKEPKG_CONF:-}"
+ local system="${sysconfdir}/$slug.conf"
+ local olduser="$LIBREHOME/.$slug.conf"
+ local newuser="$XDG_CONFIG_HOME/pacman/$slug.conf"
+ if [[ "$manual" != "$system" && -r "$manual" ]]; then
+ # Manually-specified file
+ echo "$manual"
else
- echo "${sysconfdir}/$slug.conf"
- echo "$LIBREHOME/.$slug.conf"
+ # Normal file lookup
+ echo "$system"
+ if [[ -r "$olduser" && ! -r "$newuser" ]]; then
+ echo "$olduser"
+ else
+ echo "$newuser"
+ fi
fi
;;
xbs*)
@@ -78,7 +88,8 @@ list_envvars() {
PKGDEST SRCDEST SRCPKGDEST LOGDEST \
BUILDDIR \
PKGEXT SRCEXT \
- GPGKEY PACKAGER
+ GPGKEY PACKAGER \
+ CARCH
;;
libretools)
printf '%s\n' DIFFPROG