mirror of
https://github.com/brain-hackers/buildbrain
synced 2024-11-14 22:38:01 +09:00
Merge pull request #17 from unasuke/loopdev
Use last loop device from `loopdev -l`
This commit is contained in:
commit
682b8a44b4
@ -40,7 +40,7 @@ sfdisk ${IMG} < ${WORK}/part.sfdisk
|
||||
|
||||
sudo kpartx -av ${IMG}
|
||||
|
||||
LOOPDEV=$(losetup -l | grep sd.img | grep -o 'loop.')
|
||||
LOOPDEV=$(losetup -l | grep sd.img | grep -o 'loop.' | tail -n 1)
|
||||
|
||||
sudo mkfs.fat -F32 -v -I /dev/mapper/${LOOPDEV}p1
|
||||
sudo mkfs.ext4 /dev/mapper/${LOOPDEV}p2
|
||||
|
Loading…
Reference in New Issue
Block a user