travis/build.sh: use -jX in xbps-src.

Do not rely on nproc(1) being available.

Signed-off-by: Juan RP <xtraeme@gmail.com>
This commit is contained in:
Juan RP 2019-06-04 12:09:53 +02:00 committed by Enno Boland
parent 1ed98ee33c
commit baa928b247

View File

@ -25,8 +25,13 @@ XBPS_SRCPKGDIR=/hostrepo/srcpkgs XBPS_MASTERDIR=/ chroot_prepare $1 || {
PKGS=$(/hostrepo/xbps-src sort-dependencies $(cat /tmp/templates))
NPROCS=1
if [ -r /proc/cpuinfo ]; then
NPROCS=$(grep ^proc /proc/cpuinfo|wc -l)
fi
for pkg in ${PKGS}; do
/hostrepo/xbps-src -H "$HOME"/hostdir $arch pkg "$pkg"
/hostrepo/xbps-src -j$NPROCS -H "$HOME"/hostdir $arch pkg "$pkg"
[ $? -eq 1 ] && exit 1
done