userspace-installation-maid/.local/bin/lsblkmounter

27 lines
504 B
Plaintext
Raw Normal View History

2024-02-05 03:30:51 -05:00
#!/bin/bash
lsblk
echo ""
if [ ! -z $1 ] && [ ! -z $2 ]
then
if [ "$1" == "umount" ]
then
sudo umount ~/Mounts/$2
else
mkdir -p ~/Mounts
mkdir -p ~/Mounts/$2
if [ "$1" == "mtp" ]
then
aft-mtp-mount ~/Mounts/$2
else
sudo mount /dev/$1 ~/Mounts/$2
echo ""
df -h
fi
fi
else
echo ""
echo "Input 'NAME' to mount in ~/Mounts/'NAME'"
echo "Use 'mtp' to mount Android by USB"
fi