I want to use sshfs
to mount folders from my server to my laptop.
Ive been doing this my making a directory, for example making the dir mount under my desktop
mkdir ~/Desktop/mount
and then I would use sshfs to mount to that
sshfs user@ipaddress:path/to/file ~/Desktop/mount -o volname=Something
This works just fine. Except that I have to make that directory first. I wrote a script to make the dir for me and mount it
umount ~/Desktop/mount
rm -rf ~/Desktop/mount
mkdir ~/Desktop/mount
sshfs ichill@192.168.1.142:$1 ~/Desktop/mount -o volname=$1
The problem then is trying to make multiple mounts. So, I revised the above code to make multiple mounts
umount ~/Desktop/$1
rm -rf ~/Desktop/$1
mkdir ~/Desktop/$1
sshfs ichill@192.168.1.142:$1 ~/Desktop/$1 -o volname=$1
No the problem is, I get left with sometimes 4 to 5 empty folders.
Is there a way to make this mount without having to make folder each time.
EDIT: I also dont want to make a script to unmount it. I would like to use the system eject calls.