summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2014-12-31 12:50:21 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2014-12-31 12:50:21 -0500
commitec9ee1451184d7b40fd43e6094a4176642cdc751 (patch)
treee9e510b11d453ab1dd52189e06b53fafda7505cd /src/lib
parent29dfb7a119dd31b09d6792fa4a75ff30d3ace868 (diff)
conf.sh: update to reflect changes in makepkg 4.2
Diffstat (limited to 'src/lib')
-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