On 06/07/14 08:33, Luke Shumaker wrote:
At Wed, 2 Jul 2014 17:04:13 +0200, Johannes Löthberg wrote:
If no $XDG_CONFIG_HOME/pacman/makepkg.conf file exists we fall back to sourcing $HOME/.makepkg.conf
# Source user-specific makepkg.conf overrides, but only if no override config # file was specified -if [[ $MAKEPKG_CONF = "$confdir/makepkg.conf" && -r ~/.makepkg.conf ]]; then - source_safe ~/.makepkg.conf +XDG_PACMAN_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/pacman" +if [[ "$MAKEPKG_CONF" = "$confdir/makepkg.conf" ]]; then + if [[ -r "$XDG_PACMAN_DIR/makepkg.conf" ]]; then + source_safe "$XDG_PACMAN_DIR/makepkg.conf" + elif [[ -r "$HOME/.makepkg.conf" ]]; then + source_safe "$HOME/.makepkg.conf" + fi fi
Is "falling back" the right thing? My gut sort of tells me that if they both exist, they should both be loaded, but that's just me.
By the looks of the who XDG crap specification, there are other directories defined and these are supposed to be on order. So I'm happy with the XDG_CONFIG_HOME file taking priority and will document that. Allan