mirror of
https://github.com/ValdikSS/windows2usb.git
synced 2023-08-10 21:13:16 +03:00
Print message when no removable storage is detected
This commit is contained in:
parent
35565d0ce6
commit
df471fd672
@ -39,8 +39,13 @@ function check_iso_and_device() {
|
||||
}
|
||||
|
||||
function list_removable_drives() {
|
||||
lsblk -d -I 8 -o RM,NAME,SIZE,MODEL | \
|
||||
awk '($1 == 1) {print "/dev/" substr($0, index($0, $2))}'
|
||||
lsblk=$(lsblk -d -I 8 -o RM,NAME,SIZE,MODEL | \
|
||||
awk '($1 == 1) {print "/dev/" substr($0, index($0, $2))}')
|
||||
if [[ "$lsblk" ]]; then
|
||||
echo "$lsblk"
|
||||
else
|
||||
echo "No removable storage found!"
|
||||
fi
|
||||
}
|
||||
|
||||
function format_drive() {
|
||||
|
Loading…
Reference in New Issue
Block a user