1
0
Fork 0
dotfiles/.local/bin/scripts/mnt
2025-06-16 11:04:16 +03:00

11 lines
227 B
Bash
Executable file

#!/bin/bash
set -e
[ -z "$1" ] && { echo "No arguments supplied!" ; exit 1; }
if [ "$(udisksctl info -b "$1" | grep -c 'MountPoints:\s\{8\}.')" -eq 0 ]; then
udisksctl mount -b "$1"
else
udisksctl unmount -b "$1"
fi