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

27 lines
504 B
Bash
Executable File

#!/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