2020-01-05 09:11:30 +00:00
|
|
|
#!/bin/sh
|
2015-04-09 22:53:46 +00:00
|
|
|
#
|
|
|
|
# build.sh
|
|
|
|
|
2015-04-15 09:23:37 +00:00
|
|
|
if [ "$1" != "$2" ]; then
|
|
|
|
arch="-a $2"
|
2015-04-09 22:53:46 +00:00
|
|
|
fi
|
|
|
|
|
2019-03-06 01:47:54 +00:00
|
|
|
PKGS=$(/hostrepo/xbps-src sort-dependencies $(cat /tmp/templates))
|
2015-08-16 08:53:30 +00:00
|
|
|
|
2019-06-04 10:09:53 +00:00
|
|
|
NPROCS=1
|
|
|
|
if [ -r /proc/cpuinfo ]; then
|
|
|
|
NPROCS=$(grep ^proc /proc/cpuinfo|wc -l)
|
|
|
|
fi
|
|
|
|
|
2015-08-16 08:53:30 +00:00
|
|
|
for pkg in ${PKGS}; do
|
2019-06-04 10:09:53 +00:00
|
|
|
/hostrepo/xbps-src -j$NPROCS -H "$HOME"/hostdir $arch pkg "$pkg"
|
2015-04-10 09:38:13 +00:00
|
|
|
[ $? -eq 1 ] && exit 1
|
2015-04-09 22:53:46 +00:00
|
|
|
done
|
|
|
|
|
2015-04-10 12:38:49 +00:00
|
|
|
exit 0
|