From f52a90e564c8ea1a540aa516dde31df0068c803e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petar=20Tomi=C4=87?= Date: Tue, 14 Jul 2020 00:55:25 +0200 Subject: [PATCH] add-sudo-to-mkdir (#761) --- .local/bin/dmenumountcifs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/dmenumountcifs b/.local/bin/dmenumountcifs index 3be6e86..99be72f 100755 --- a/.local/bin/dmenumountcifs +++ b/.local/bin/dmenumountcifs @@ -11,7 +11,7 @@ share=$(smbclient -L "$srvname" -N | grep Disk | awk '{print $1}' | dmenu -i -p share2mnt=//"$srvname".local/"$share" sharemount() { - mounted=$(mount -v | grep "$share2mnt") || ([ ! -d /mnt/"$share" ] && mkdir /mnt/"$share") + mounted=$(mount -v | grep "$share2mnt") || ([ ! -d /mnt/"$share" ] && sudo mkdir /mnt/"$share") [ -z "$mounted" ] && sudo mount -t cifs "$share2mnt" -o user=nobody,password="" /mnt/"$share" && notify-send "Netshare $share mounted" && exit 0 notify-send "Netshare $share already mounted"; exit 1 }