diff options
author | Timmy Keller <tjk@tjkeller.xyz> | 2023-02-02 21:01:54 -0600 |
---|---|---|
committer | Timmy Keller <tjk@tjkeller.xyz> | 2023-02-02 21:01:54 -0600 |
commit | 5d5f3a9ad6798fb6ded1c5f8976be485f5636d66 (patch) | |
tree | 7cdddea609fd8fa14d190409e95554f17443532b | |
parent | 484d7a8ae9a50f1df8d1fedafcc4fc4dc5a94e44 (diff) | |
download | scripts-5d5f3a9ad6798fb6ded1c5f8976be485f5636d66.tar.xz scripts-5d5f3a9ad6798fb6ded1c5f8976be485f5636d66.zip |
sudk
-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 |