#!/bin/bash

# SPDX-FileCopyrightText: 2013 - 2025 ENCRYPTED SUPPORT LLC <adrelanos@kicksecure.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

set -x
set -e

VMNAME="test"

mount_img() {
   sync
   kpartx -av "/home/$SUDO_USER/debootstraptestbin/$VMNAME.img"
   sync
   mkdir -p "/home/$SUDO_USER/debootstraptestbin/mounted"
   sync
   mount "/dev/mapper/loop0p1 /home/$SUDO_USER/debootstraptestbin/mounted"
   sync
}

mount_img
