xbps-src: check for required utilities in the host system.
This commit is contained in:
@@ -46,6 +46,21 @@ sighandler_exit()
|
||||
exit $?
|
||||
}
|
||||
|
||||
check_reqhost_utils()
|
||||
{
|
||||
[ -n "$in_chroot" ] && return 0
|
||||
|
||||
echo -n "=> Checking for required host utilities... "
|
||||
for f in awk bash sed gcc msgfmt patch makeinfo perl fakeroot; do
|
||||
if ! command -v ${f} 2>&1 >/dev/null; then
|
||||
echo
|
||||
echo "${f} is missing in your system, can't continue! exiting..."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
echo "done."
|
||||
}
|
||||
|
||||
usage()
|
||||
{
|
||||
cat << _EOF
|
||||
@@ -178,6 +193,11 @@ if [ -z "$target" ]; then
|
||||
usage && exit 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Check for required utilities in host system.
|
||||
#
|
||||
check_reqhost_utils
|
||||
|
||||
#
|
||||
# Check configuration vars before anyting else, and set defaults vars.
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user