~thopiekar/pacman-pm/devtools

« back to all changes in this revision

Viewing changes to makechrootpkg.in

  • Committer: Jan Alexander Steffens (heftig)
  • Date: 2016-06-12 22:06:54 UTC
  • Revision ID: git-v1:9727b684e60c56775ef071be3707059b1d1518e1
makechrootpkg: Shorten user-config loading code

Make use of load_vars returning 1 when the file is missing. Avoids
introducing another variable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
306
306
 
307
307
umask 0022
308
308
 
309
 
XDG_PACMAN_DIR="${XDG_CONFIG_HOME:-$USER_HOME/.config}/pacman"
310
 
if [[ -r "$XDG_PACMAN_DIR/makepkg.conf" ]]; then
311
 
        load_vars "$XDG_PACMAN_DIR/makepkg.conf"
312
 
elif [[ -r "$USER_HOME/.makepkg.conf" ]]; then
313
 
        load_vars "$USER_HOME/.makepkg.conf"
314
 
fi
 
309
load_vars "${XDG_CONFIG_HOME:-$USER_HOME/.config}/pacman/makepkg.conf" || load_vars "$USER_HOME/.makepkg.conf"
315
310
load_vars /etc/makepkg.conf
316
311
 
317
312
# Use PKGBUILD directory if these don't exist