xbps-src: use XBPS_LIBEXECDIR and XBPS_SHAREDIR in all scripts that need substs.

This commit is contained in:
Juan RP
2011-11-18 14:05:51 +01:00
parent dd4feb7b41
commit c011a2749b
5 changed files with 13 additions and 24 deletions

View File

@@ -55,7 +55,7 @@ mount_chroot_fs()
continue
fi
[ ! -d ${blah} ] && echo "failed." && continue
@@XBPS_INSTALL_LIBEXECDIR@@/capmount \
${XBPS_LIBEXECDIR}/capmount \
${dowrite} ${blah} ${MASTERDIR}/${f} \
2>/dev/null
if [ $? -eq 0 ]; then
@@ -85,7 +85,7 @@ umount_chroot_fs()
echo ${cnt} > ${MASTERDIR}/.${fs}_mount_bind_done
else
echo -n "=> Unmounting ${fs} from chroot... "
@@XBPS_INSTALL_LIBEXECDIR@@/capumount \
${XBPS_LIBEXECDIR}/capumount \
${MASTERDIR} ${fs} 2>/dev/null
if [ $? -eq 0 ]; then
rm -f ${MASTERDIR}/.${fs}_mount_bind_done

View File

@@ -28,23 +28,13 @@ PKG_TMPLNAME="$1"
if [ -n "${CONFIG_FILE}" -a -r "${CONFIG_FILE}" ]; then
. ${CONFIG_FILE}
else
if [ -n "$IN_CHROOT" ]; then
. /usr/local/etc/xbps-src.conf
else
. @@XBPS_INSTALL_ETCDIR@@/xbps-src.conf
fi
fi
if [ -n "${MASTERDIR}" ]; then
export XBPS_MASTERDIR="${MASTERDIR}"
fi
if [ -n "$IN_CHROOT" ]; then
. /usr/local/share/xbps-src/shutils/init_funcs.sh
else
. @@XBPS_INSTALL_SHAREDIR@@/shutils/init_funcs.sh
fi
. ${XBPS_SHAREDIR}/shutils/init_funcs.sh
set_defvars