rice/usbm

10 lines
326 B
Plaintext
Raw Normal View History

2019-05-15 08:51:58 +00:00
#!/bin/bash
# Mounting script for usb drives for use in dmenu
mountable=$(lsblk -lp | grep "part $" | awk '{print $1, $4 }')
[ -z "$mountable" ] && exit 0
usb=$(echo "$mountable" |\
dmenu -i -l 5 -p "Which usb drive should we mount?" |\
awk '{print $1}')
2019-07-04 20:31:12 +00:00
mkdir -p ~/.mntpts
2019-05-15 08:51:58 +00:00
mount $(basename $usb) ~/.mntpts/$(basename $usb)