looqs-bundle/build

19 line
618 B
Plaintext

2022-06-22 23:25:33 +02:00
#!/bin/sh
2022-06-22 23:25:33 +02:00
set -e
[ -d cache ] || mkdir cache
SPAWN="bwrap --bind gentoo / --dev /dev --proc /proc --perms 1777 --tmpfs /dev/shm --ro-bind /etc/resolv.conf /etc/resolv.conf --bind $(realpath ./out) /out --bind $(realpath scripts) /scripts --bind $(realpath cache) /var/cache/distfiles "
export UNPRIVUSER=$(id -n -u 1000)
if [ "$1" != "skipsetup" ] ; then
su $UNPRIVUSER -c ./scripts/1-create.sh
./scripts/2-create.sh
${SPAWN} /scripts/3-setup-gentoo.sh
chown "$UNPRIVUSER" -R out
fi
${SPAWN} su - builder -c /scripts/4-build-looqs.sh
chown "$UNPRIVUSER" -R out
su $UNPRIVUSER -c "cd $(pwd); ./scripts/5-bundle.sh"
2022-06-22 23:25:33 +02:00