makechrootpkg: Shorten user-config loading code

Make use of load_vars returning 1 when the file is missing. Avoids
introducing another variable.
parent e3fe7134
......@@ -306,12 +306,7 @@ fi
umask 0022
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"
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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment