#!/bin/bash
# Estrae hal91.img montandolo in loop

IMG="hal91.img"
MOUNTDIR="mnt_hal91"
DESTDIR="hal91"

mkdir -p "$MOUNTDIR" "$DESTDIR"

sudo mount -o loop "$IMG" "$MOUNTDIR"
cp -r "$MOUNTDIR"/* "$DESTDIR"
sleep 1
sudo umount "$MOUNTDIR"
rmdir "$MOUNTDIR"
