mirror of
https://github.com/kevinveenbirkenbach/linux-image-manager.git
synced 2025-11-21 09:46:25 +00:00
Implemented set_device_path function
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user