2
0
butterknife-provisioning-image/overlay/sbin/butterknife-select-btrfs-filesystem
2021-02-23 00:32:51 +02:00

20 lines
415 B
Bash
Executable File

#!/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