diff options
Diffstat (limited to 'keyboard')
-rwxr-xr-x | keyboard/mounter | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/keyboard/mounter b/keyboard/mounter index e0a8fac..7718cc4 100755 --- a/keyboard/mounter +++ b/keyboard/mounter @@ -1,7 +1,7 @@ #!/bin/sh # TODO: add support for mounting discs sudo=${SUDO:-sudo} -mps=/media/mnt # User should have ownership of this directory +mps=/run/media/$USER # User should have ownership of this directory notify='notify-send --urgency low' devexist() { [ -z $1 ] || ([ ! -e "$1" ] && $notify "Device $1 does not exist!") && exit 1; } @@ -23,7 +23,7 @@ mnt() { awk_mpname='{ print $3 ? substr($0, index($0, $3)) : $1 " " toupper($2) " Volume" }' mp="$mps/$(lsblk -no SIZE,FSTYPE,LABEL $part | awk "$awk_mpname")" [ -e "$mp" ] && mp="$mp $(lsblk -no PARTUUID $part)" - mkdir -p "$mp" + $sudo mkdir -p "$mp" # Handle filesystem cases case `lsblk -no FSTYPE $part` in |