Signed-off-by: kokkiemouse <kokkiemouse@gmail.com>
local mount
for mount in $(mount | awk '{print $3}' | grep "$(realpath "${work_dir}")" | sort -r); do
- _msg_info "Unmounting ${mount}"
- umount -fl "${mount}"
+ if [[ "${mount}" == "${work_dir}/airootfs" ]]; then
+ :
+ else
+ _msg_info "Unmounting ${mount}"
+ umount -fl "${mount}"
+ fi
done
}
chroot "${work_dir}/airootfs" "${@}"
for mount in $(mount | awk '{print $3}' | grep "$(realpath "${work_dir}")" | sort -r); do
- umount -fl "${mount}"
+ if [[ "${mount}" == "${work_dir}/airootfs" ]]; then
+ :
+ else
+ umount -fl "${mount}"
+ fi
done
}
fi
fi
+umount -f "${work_dir}/airootfs"
prepare_build
run_once make_basefs