This commit is contained in:
teldra 2021-05-09 21:31:39 +02:00
parent 58636479ec
commit 7f1f8541c1
1 changed files with 3 additions and 3 deletions

View File

@ -16,9 +16,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
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}); }")