diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2014-12-31 12:50:21 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2014-12-31 12:50:21 -0500 |
commit | ec9ee1451184d7b40fd43e6094a4176642cdc751 (patch) | |
tree | e9e510b11d453ab1dd52189e06b53fafda7505cd | |
parent | 29dfb7a119dd31b09d6792fa4a75ff30d3ace868 (diff) |
conf.sh: update to reflect changes in makepkg 4.2
-rw-r--r-- | src/lib/conf.sh.in | 21 |
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 |