xbps-src: check for required utilities in the host system.

This commit is contained in:
Juan RP
2010-05-17 22:23:52 +02:00
parent 66321f05e6
commit 73eb032904
2 changed files with 21 additions and 1 deletions

View File

@@ -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.
#