2015-04-10 13:40:02 +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
|
|
|
# Tell xbps-src what is our arch, this is done when doing
|
|
|
|
# binary-bootstrap, but we need to do it every time since
|
|
|
|
# our masterdir is ethereal.
|
|
|
|
/bin/echo -e '\x1b[32mWriting bootstrap arch into .xbps_chroot_init of masterdir\x1b[0m'
|
|
|
|
echo "$1" > /hostrepo/masterdir/.xbps_chroot_init
|
|
|
|
|
|
|
|
PKGS=$(/hostrepo/xbps-src sort-dependencies $(cat /tmp/templates))
|
2015-08-16 08:53:30 +00:00
|
|
|
|
|
|
|
for pkg in ${PKGS}; do
|
2019-03-06 01:47:54 +00:00
|
|
|
/hostrepo/xbps-src -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
|