summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Hill <ahill@breadpudding.dev>2025-04-12 22:39:10 -0400
committerAlexander Hill <ahill@breadpudding.dev>2025-04-12 22:39:10 -0400
commit74b0ac4fa886e1bba9a1a77ddf8037ed01cccf9e (patch)
tree65e685521dd2af3092c2267b778f3512e06335ea
parent04cd50fa9e083e5d83ad7b299bb3cca0c54b517a (diff)
Made /maple/sources an optional mountpoint
-rwxr-xr-xchroot-bootstrap.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/chroot-bootstrap.sh b/chroot-bootstrap.sh
index 8afe8d0..a09bbaf 100755
--- a/chroot-bootstrap.sh
+++ b/chroot-bootstrap.sh
@@ -6,9 +6,13 @@ if mount --rbind /dev $MAPLE/dev && mount --make-rslave $MAPLE/dev; then
if mount --rbind /sys $MAPLE/sys && mount --make-rslave $MAPLE/sys; then
if mount --rbind /tmp $MAPLE/tmp; then
if mount --bind /run $MAPLE/run; then
- if mount --bind ./sources $MAPLE/maple/sources; then
+ if [ -d $MAPLE/maple/sources ]; then
+ if mount --bind ./sources $MAPLE/maple/sources; then
+ chroot $MAPLE /bin/sh
+ umount $MAPLE/maple/sources
+ fi
+ else
chroot $MAPLE /bin/sh
- umount $MAPLE/maple/sources
fi
umount $MAPLE/run
fi