# check for syntax errors
# set -n
-VER=2.1.4
+VER=2.1.5
# default values {
elif [[ $choice == 'shrink' ]]; then
part_shrink "$device"
elif [[ $choice == 'auto' ]]; then
- local root_size txt label boot_fs
+ local root_size txt label boot_fs boot_type
root_size=$(lsblk -lno SIZE "$device" | awk 'NR == 1 {if ($1 ~ "G") {sub(/G/, ""); print ($1 * 1000 - 512) / 1000 "G"} else {sub(/M/, ""); print ($1 - 512) "M"}}')
txt="\nWARNING:\n\nALL data on $device will be destroyed and the following partitions will be created\n\n- "
if [[ $SYS == 'BIOS' ]]; then
txt+="A $boot_fs efi boot partition (512M)\n- "
fi
txt+="An ext4 partition using all remaining space ($root_size)\n\nDo you want to continue?\n"
- yesno "Auto Partition" "$txt" && part_auto "$device" "$label" "$boot_fs" "$root_size"
+ yesno "Auto Partition" "$txt" && part_auto "$device" "$label" "$boot_fs" "$root_size" "$boot_type"
else
clear
tput cnorm