Actually tested this time

This commit is contained in:
Larry Steele 2018-11-06 23:49:57 -05:00
parent 5fb1bbfe73
commit 78407e06ff

View File

@ -37,7 +37,7 @@ asktype() { \
} }
anddrives=$(simple-mtpfs -l 2>/dev/null) anddrives=$(simple-mtpfs -l 2>/dev/null)
usbdrives="$(lsblk -rpo "name,type,size,mountpoint,label" | awk -F'[ ]' '$2=="part" && $4=="" printf("%s %s (%s)\n",$5,$1,$3)}')" usbdrives="$(lsblk -rpo "name,type,size,mountpoint,label" | awk -F'[ ]' '$2=="part" && $4=="" {printf "%s %s (%s)\n",$5,$1,$3}')"
if [ -z "$usbdrives" ]; then if [ -z "$usbdrives" ]; then
[ -z "$anddrives" ] && echo "No USB drive or Android device detected" && exit [ -z "$anddrives" ] && echo "No USB drive or Android device detected" && exit
echo "Android device(s) detected." echo "Android device(s) detected."