xbps-src: don't overwrite xbps-conf.plist in chroot if exists.

This commit is contained in:
Juan RP 2011-07-02 21:59:06 +02:00
parent 2e053410c6
commit 290703f4fb

View file

@ -198,13 +198,15 @@ create_binsh_symlink()
prepare_binpkg_repos()
{
local repo xver
local repo xver CONF_FILE
# Copy xbps-conf.plist for XBPS utils >= 0.9.0.
xver=$($XBPS_PKGDB_CMD -V|awk '{print $2}')
if [ -n "$xver" ]; then
CONF_FILE=$XBPS_MASTERDIR/usr/local/etc/xbps-conf.plist
for f in /etc /usr/local/etc; do
if [ -f $f/xbps-conf.plist ]; then
if [ -f $f/xbps-conf.plist -a \
! -f $CONF_FILE ]; then
cp -f $f/xbps-conf.plist \
${XBPS_MASTERDIR}/usr/local/etc
fi