blob: 1cb07de5de31a4616135a04ceb2eedee536df0a2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!/bin/bash
trap "umount_all" 0 ERR TERM KILL
user=${SUDO_USER:-${1}}
umount_all() {
for mp in home/pkgdest home/srcdest home/${user}; do
msg "Umounting /$mp"
umount $CHROOTDIR/$CHCOPY/$mp || error "Couldn't umount"
done
}
source /etc/libretools.conf
for mp in home/pkgdest home/srcdest home/${user} var/lib/toru; do
msg "Binding /$mp"
mount -o bind /$mp $CHROOTDIR/$CHCOPY/$mp || exit 1
done
for etc in etc/makepkg.conf etc/abs.conf etc/mtab; do
msg "Copying config /$etc"
cp --remove-destination /$etc $CHROOTDIR/$CHCOPY/$etc || exit 1
done
$(dirname $0)/librechroot $CHCOPY
exit $?
|