diff options
| author | Richard Halford <63303646+rsHalford@users.noreply.github.com> | 2021-09-03 17:15:52 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-03 17:15:52 +0100 |
| commit | 965a1dcad234ebeca20641f625947d51c0c07625 (patch) | |
| tree | dfade515b29b4a573b09d3b1ca39fe66b42c3ff1 /.local/bin/dmenumount | |
| parent | 9a2dc2618e4875b59a19709ec810402ce7d5df28 (diff) | |
| download | eibhear-965a1dcad234ebeca20641f625947d51c0c07625.tar.gz eibhear-965a1dcad234ebeca20641f625947d51c0c07625.tar.zst eibhear-965a1dcad234ebeca20641f625947d51c0c07625.zip | |
Add partition labelling to dmenumount
If a partition doesn't have a label, it results in a double space that awk ignores. Which is why the changes include a pipe into sed.
Diffstat (limited to '.local/bin/dmenumount')
| -rwxr-xr-x | .local/bin/dmenumount | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/.local/bin/dmenumount b/.local/bin/dmenumount index 3cb1f81..cb0601e 100755 --- a/.local/bin/dmenumount +++ b/.local/bin/dmenumount @@ -50,7 +50,7 @@ asktype() { \ } anddrives=$(simple-mtpfs -l 2>/dev/null) -usbdrives="$(lsblk -rpo "name,type,size,mountpoint" | grep 'part\|rom' | awk '$4==""{printf "%s (%s)\n",$1,$3}')" +usbdrives="$(lsblk -rpo "name,type,size,label,mountpoint" | grep 'part\|rom' | sed 's/ /:/g' | awk -F':' '$5==""{printf "%s (%s) %s\n",$1,$3,$4}')" if [ -z "$usbdrives" ]; then [ -z "$anddrives" ] && echo "No USB drive or Android device detected" && exit |
