xbps-src: bail out if the xbps static utils aren't installed in masterdir.
This commit is contained in:
parent
3010150032
commit
0e74f8bc18
1 changed files with 12 additions and 7 deletions
|
@ -50,13 +50,18 @@ check_reqhost_utils()
|
|||
{
|
||||
[ -n "$in_chroot" ] && return 0
|
||||
|
||||
for f in gawk bash sed gcc msgfmt patch makeinfo perl fakeroot \
|
||||
xbps-bin.static xbps-repo.static xbps-uhelper.static; do
|
||||
for f in gawk bash sed gcc msgfmt patch makeinfo perl fakeroot; do
|
||||
if ! command -v ${f} 2>&1 >/dev/null; then
|
||||
echo "${f} is missing in your system, can't continue! exiting..."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
for f in bin repo uhelper; do
|
||||
if [ ! -x ${XBPS_MASTERDIR}/usr/local/sbin/xbps-${f}.static ]; then
|
||||
echo "xbps-${f}.static not found in ${XBPS_MASTERDIR}!"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
usage()
|
||||
|
@ -212,11 +217,6 @@ if [ -z "$target" ]; then
|
|||
usage && exit 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Check for required utilities in host system.
|
||||
#
|
||||
check_reqhost_utils
|
||||
|
||||
if [ -n "$in_chroot" ]; then
|
||||
XBPS_CONFIG_FILE="/usr/local/etc/xbps-src.conf"
|
||||
fi
|
||||
|
@ -231,6 +231,11 @@ fi
|
|||
. @@XBPS_INSTALL_SHAREDIR@@/shutils/init_funcs.sh
|
||||
set_defvars
|
||||
|
||||
#
|
||||
# Check for required utilities in host system.
|
||||
#
|
||||
check_reqhost_utils
|
||||
|
||||
. $XBPS_SHUTILSDIR/common_funcs.sh
|
||||
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue