summaryrefslogtreecommitdiff
path: root/makechrootpkg.in
diff options
context:
space:
mode:
authorJan Alexander Steffens (heftig) <jan.steffens@gmail.com>2016-06-13 00:05:55 +0200
committerJan Alexander Steffens (heftig) <jan.steffens@gmail.com>2016-06-13 00:06:54 +0200
commit9727b684e60c56775ef071be3707059b1d1518e1 (patch)
tree39c3801d13991a0a345ff29731e8d32885459784 /makechrootpkg.in
parente3fe7134e2f8d99770226e7a8a7a07cbf106883b (diff)
downloaddevtools32-9727b684e60c56775ef071be3707059b1d1518e1.tar.xz
makechrootpkg: Shorten user-config loading code
Make use of load_vars returning 1 when the file is missing. Avoids introducing another variable.
Diffstat (limited to 'makechrootpkg.in')
-rw-r--r--makechrootpkg.in7
1 files changed, 1 insertions, 6 deletions
diff --git a/makechrootpkg.in b/makechrootpkg.in
index 6f80384..cd9efce 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -306,12 +306,7 @@ fi
umask 0022
-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 "${XDG_CONFIG_HOME:-$USER_HOME/.config}/pacman/makepkg.conf" || load_vars "$USER_HOME/.makepkg.conf"
load_vars /etc/makepkg.conf
# Use PKGBUILD directory if these don't exist