xbps-src: if etc/conf does not exist fallback to ~/.xbps-src.conf.
This commit is contained in:
parent
871d2fa873
commit
d6d7e860a6
2 changed files with 9 additions and 6 deletions
11
xbps-src
11
xbps-src
|
@ -369,10 +369,13 @@ else
|
|||
if [ -f $XBPS_DISTDIR/etc/defaults.conf ]; then
|
||||
. $XBPS_DISTDIR/etc/defaults.conf
|
||||
fi
|
||||
readonly XBPS_CONFIG_FILE=$XBPS_DISTDIR/etc/conf
|
||||
# If ~/.xbps-src.conf exists, use it too.
|
||||
if [ -s $HOME/.xbps-src.conf ]; then
|
||||
. $HOME/.xbps-src.conf
|
||||
if [ -s $XBPS_DISTDIR/etc/conf ]; then
|
||||
# Read user configuration first...
|
||||
readonly XBPS_CONFIG_FILE=$XBPS_DISTDIR/etc/conf
|
||||
elif [ -s $HOME/.xbps-src.conf ]; then
|
||||
# ... fallback to ~/.xbps-src.conf otherwise.
|
||||
readonly XBPS_CONFIG_FILE=$HOME/.xbps-src.conf
|
||||
. $XBPS_CONFIG_FILE
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue