This commit is contained in:
teldra 2021-05-09 19:20:58 +02:00
parent 06aa57dab5
commit 8302886689

View File

@ -19,6 +19,9 @@ for i in $(find /dev/disk/by-id/ -type l -printf "%P\n"|grep -v "part" |tac); do
if [[ "${name}" == *"/dev/sr"* ]]; then
continue
fi
if [[ ! "${i}" == "usb"* ]] && [[ ! "${i}" == "ata"* ]]; then
continue
fi
index=$(( index + 1 ))
size="$(fdisk -l "${name}" | head -n1 | awk '{print $3}')"
size=$(awk "BEGIN { printf(\"%.0f\n\", ${size}); }")