summaryrefslogblamecommitdiffstats
path: root/inc/helper.inc.sh
blob: 10f15ee6a362cfd9ee9ff0f8e2566a370822c1ba (plain) (tree)
1
2
3
4
5
6
7
8
9
10

                   
                                               
                                              
                                                                                  
                                                              
                                                                                                                               


                     


                                      
                 
 

setupBindmounts() {
  mount -t proc proc $BROOT_BUILDROOT_PATH/proc
  mount -o bind /dev $BROOT_BUILDROOT_PATH/dev
  [ ! -f $BROOT_BUILDROOT_PATH/dev/pts ] && mkdir -p $BROOT_BUILDROOT_PATH/dev/pts
  chroot $BROOT_BUILDROOT_PATH mount -t devpts devpts /dev/pts
  [ "x$(cat /proc/mounts | grep -q "/tmp/deb")" == "x" ] && mount -o bind /tmp/deb $BROOT_BUILDROOT_PATH/var/cache/apt/archives
}

destroyBindmounts() {
  umount $BROOT_BUILDROOT_PATH/proc
  umount $BROOT_BUILDROOT_PATH/dev/pts
  umount $BROOT_BUILDROOT_PATH/dev
  umount /tmp/deb
}