summaryrefslogtreecommitdiffstats
path: root/sftp-mount.sh
blob: 941814642419bd21f1fa249754c533f0db8cc7bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

set -e

for i in "$@"; do
	mnt=~/mnt/$i

	if ! mountpoint -q $mnt; then
		mkdir -p $mnt
		sshfs web-$i@karif: $mnt
	else
		fusermount -u $mnt
		rmdir $mnt
	fi
done