summaryrefslogtreecommitdiffstats
path: root/sftp-mount.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sftp-mount.sh')
-rwxr-xr-xsftp-mount.sh18
1 files changed, 10 insertions, 8 deletions
diff --git a/sftp-mount.sh b/sftp-mount.sh
index e2fb3ae..9418146 100755
--- a/sftp-mount.sh
+++ b/sftp-mount.sh
@@ -2,12 +2,14 @@
set -e
-mnt=~/mnt/$1
+for i in "$@"; do
+ mnt=~/mnt/$i
-if ! mountpoint -q $mnt; then
- mkdir -p $mnt
- sshfs web-$1@karif: $mnt
-else
- fusermount -u $mnt
- rmdir $mnt
-fi
+ if ! mountpoint -q $mnt; then
+ mkdir -p $mnt
+ sshfs web-$i@karif: $mnt
+ else
+ fusermount -u $mnt
+ rmdir $mnt
+ fi
+done