build: test pkg and git binaries; closes #197

This commit is contained in:
Franco Fichtner 2020-09-12 17:04:04 +02:00
parent ae81fbb8c8
commit 123b8977cf
1 changed files with 9 additions and 4 deletions

View File

@ -278,11 +278,16 @@ confirm|fingerprint|info|print)
;;
esac
PKGBIN=$(which pkg || true)
for WANT in git pkg; do
if [ -z "$(which ${WANT})" ]; then
echo ">>> Required binary '${WANT}' is not installed." >&2
exit 1
fi
done
for WANT in git ${PRODUCT_WANTS}; do
if ! ${PKGBIN} info ${WANT} > /dev/null; then
echo ">>> Required build package '${WANT}' is not installed." >&2
for WANT in ${PRODUCT_WANTS}; do
if ! pkg info ${WANT} > /dev/null; then
echo ">>> Required package '${WANT}' is not installed." >&2
exit 1
fi
done