Implemented set_device_path function

This commit is contained in:
2020-05-15 12:23:07 +02:00
parent df1fcfff63
commit af6e17b4c5
3 changed files with 34 additions and 27 deletions

View File

@@ -17,3 +17,15 @@ echo_partition_name(){
echo "$1$2"
fi
}
# Routine to echo the full sd-card-path
set_device_path(){
info "Available devices:"
ls -lasi /dev/ | grep -E "sd|mm"
question "Please type in the name of the device: /dev/" && read -r device
device_path="/dev/$device"
if [ ! -b "$device_path" ]
then
error "$device_path is not valid device."
fi
}