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

2
README
View File

@ -75,7 +75,7 @@ and its helpers:
To build binary packages with xbps-src also the following software needs
to be installed into the host system:
- awk, bash, bison, gcc c++, gettext, path, texinfo, perl and fakeroot.
- awk, bash, gcc c++, gettext, patch, texinfo, perl and fakeroot.
- xbps static utilities, available from http://launchpad.net/xbps.
Additionally if you want to work as 'root':

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