aboutsummaryrefslogtreecommitdiff
path: root/dmenuMount.sh
diff options
context:
space:
mode:
authorInigoGutierrez <inigogf.95@gmail.com>2019-04-09 16:26:46 +0200
committerInigoGutierrez <inigogf.95@gmail.com>2019-04-09 16:28:27 +0200
commit6e1ce4f87831d3761a46497f80e56ac7a73e14c8 (patch)
tree1ce2f613f63e9d0a8b3443ef70feb81d6ad1f583 /dmenuMount.sh
parent8da9dfb0098bf119b278e043f93a56c629013b26 (diff)
downloadscripts-6e1ce4f87831d3761a46497f80e56ac7a73e14c8.tar.gz
scripts-6e1ce4f87831d3761a46497f80e56ac7a73e14c8.zip
Minor changes.
Diffstat (limited to 'dmenuMount.sh')
-rwxr-xr-xdmenuMount.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/dmenuMount.sh b/dmenuMount.sh
index edbf4d7..f453078 100755
--- a/dmenuMount.sh
+++ b/dmenuMount.sh
@@ -33,7 +33,7 @@ do
done <<< "$(lsblk -lp | grep "part $" )"
[[ "$mountable" = "" ]] && exit 1
lines=$(echo "$mountable" | wc -l)
-chosen=$(echo "$mountable" | dmenu -i -l $lines -p "Mount which drive?" | awk '{print $2}')
+chosen=$(echo "$mountable" | dmenu -i -l "$lines" -p "Mount which drive?" | awk '{print $2}')
[ "$chosen" == "" ] && exit 1
sudo mount "$chosen" && pgrep -x dunst && notify-send "$chosen mounted." && exit 0
@@ -44,11 +44,11 @@ while read -r line
do
i=$((i+1))
directories="$directories$i. $line"$'\n'
-done <<< "$(find /mnt $HOME/mounts -type d -maxdepth 3 -empty 2>/dev/null)"
+done <<< "$(find /mnt "$HOME/mounts" -type d -maxdepth 3 -empty 2>/dev/null)"
lines=$(echo "$directories" | wc -l)
-mountpoint=$(echo "$directories" | dmenu -i -l $lines -p "Type in mount point." | awk '{print $2}')
+mountpoint=$(echo "$directories" | dmenu -i -l "$lines" -p "Type in mount point." | awk '{print $2}')
[ "$mountpoint" == "" ] && exit 1
if [[ ! -d "$mountpoint" ]]; then
prompt.sh "$mountpoint does not exist. Create it?" "sudo mkdir -p $mountpoint"
fi
-sudo mount $chosen $mountpoint && pgrep -x dunst && notify-send "$chosen mounted to $mountpoint."
+sudo mount "$chosen" "$mountpoint" && pgrep -x dunst && notify-send "$chosen mounted to $mountpoint."