butterknife-provisioning-image/overlay/sbin/butterknife-select-btrfs-filesystem

20 lines
415 B
Plaintext
Raw Permalink Normal View History

2021-02-22 22:32:51 +00:00
#!/bin/sh
volumes=$(mktemp)
unset partition
for partition in $(blkid -t TYPE=btrfs | cut -d ":" -f 1); do
echo "$partition \"$(butterknife-partition-size $partition)\"";
done > $volumes
if [ -z $partition ]; then
dialog --msgbox "Unable to detect any Butterknife filesystems" 0 0
return 1
else
dialog \
--menu "Select btrfs filesystem" 0 0 0 \
--file $volumes
fi
rm -f $volumes