summarylogtreecommitdiffstats
path: root/pendrive-detect
diff options
context:
space:
mode:
authorsimona2018-11-28 00:17:18 +0100
committersimona2018-11-28 00:17:18 +0100
commitf5bb06726271f2f4eddcd8674f05798582c0e647 (patch)
tree10d3598ccd566e5cc6d1918f16e77167f7bce39f /pendrive-detect
parentc15c276caac1dc047a533a888d2bacc2cf613db8 (diff)
downloadaur-f5bb06726271f2f4eddcd8674f05798582c0e647.tar.gz
get-pendrive fix for non nmve
Diffstat (limited to 'pendrive-detect')
-rwxr-xr-xpendrive-detect13
1 files changed, 6 insertions, 7 deletions
diff --git a/pendrive-detect b/pendrive-detect
index c5b0c132b328..143632f12734 100755
--- a/pendrive-detect
+++ b/pendrive-detect
@@ -5,16 +5,15 @@
#sget-pendrive() {
n_found=0
- #TO-DO
- #for short_dev in `lsblk -ndlo NAME` ; do
- # drive="/dev/$short_dev"
- # #if [[ -b $drive ]] ; then
- # #short_dev="${drive##*/}" # estract substring: take only final part after last '/' char
- for drive in /dev/sd?* /dev/nvme* ; do
+ for short_dev in `lsblk -ndlo NAME` ; do
+ drive="/dev/$short_dev"
if [[ -b $drive ]] ; then
+ short_dev="${drive##*/}" # estract substring: take only final part after last '/' char
+ #for drive in /dev/sd?* /dev/nvme* ; do
+ #if [[ -b $drive ]] ; then
letter=${drive:7:1}
- short_dev="${drive##*/}" # estract substring: take only final part after last '/' char
+ #short_dev="${drive##*/}" # estract substring: take only final part after last '/' char
#base search
udev=`udevadm info -q path -n $drive`