summaryrefslogtreecommitdiff
path: root/makechrootpkg.in
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2016-06-13 00:00:43 +0200
committerJan Alexander Steffens (heftig) <jan.steffens@gmail.com>2016-06-13 00:02:29 +0200
commite3fe7134e2f8d99770226e7a8a7a07cbf106883b (patch)
tree0b2863882e0edc52d0f06ee1debb639a351b66a3 /makechrootpkg.in
parent70d3c63b5c7b2e62505604df8705bafea5680723 (diff)
downloaddevtools-e3fe7134e2f8d99770226e7a8a7a07cbf106883b.tar.xz
makechrootpkg: Use XDG_CONFIG_HOME for makepkg.conf
Implemented the same way as in makepkg. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Diffstat (limited to 'makechrootpkg.in')
-rw-r--r--makechrootpkg.in7
1 files changed, 6 insertions, 1 deletions
diff --git a/makechrootpkg.in b/makechrootpkg.in
index 709e824..6f80384 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -306,7 +306,12 @@ fi
umask 0022
-load_vars "$USER_HOME/.makepkg.conf"
+XDG_PACMAN_DIR="${XDG_CONFIG_HOME:-$USER_HOME/.config}/pacman"
+if [[ -r "$XDG_PACMAN_DIR/makepkg.conf" ]]; then
+ load_vars "$XDG_PACMAN_DIR/makepkg.conf"
+elif [[ -r "$USER_HOME/.makepkg.conf" ]]; then
+ load_vars "$USER_HOME/.makepkg.conf"
+fi
load_vars /etc/makepkg.conf
# Use PKGBUILD directory if these don't exist