makechrootpkg: Shorten user-config loading code

Make use of load_vars returning 1 when the file is missing. Avoids
introducing another variable.
This commit is contained in:
Jan Alexander Steffens (heftig) 2016-06-13 00:05:55 +02:00
parent e3fe7134e2
commit 9727b684e6
1 changed files with 1 additions and 6 deletions

View File

@ -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