blob: 49bb74188155c6056ff4632f184af9875b868bc3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/usr/bin/env bash
# -*- coding: utf-8 -*-
# region imports
source '/usr/lib/rebash/core.sh'
core.import exceptions
exceptions.activate
# endregion
in_device="$1"
mkdir --parents /mnt/xmount
systemd-preserve-process-marker xmount --in qemu "$in_device" --out raw \
/mnt/xmount
loop_device="$(losetup --find)"
losetup "$loop_device" /mnt/xmount/*.dd --partscan
udevadm settle
echo "$loop_device"
# region vim modline
# vim: set tabstop=4 shiftwidth=4 expandtab:
# vim: foldmethod=marker foldmarker=region,endregion:
# endregion
|