rice/usm

11 lines
339 B
Plaintext
Raw Normal View History

2019-07-04 20:31:12 +00:00
#!/bin/sh
# pick out the drive but not sda because thats the main drive
choice=`lsblk -lp | \
grep 'disk $' | awk '{print $1, $4}' | grep -v 'sda' | \
dmenu -i -p 'Drive to mount'`
dev=`echo $choice | awk '{print $1}'`
if [ -z "$dev" ];then exit 0;fi
# Finally we can mount the thing
mkdir -p "/mnt/`basename $dev`"
mount "$dev" "$name"