summaryrefslogtreecommitdiffstats
path: root/sftp-mount.sh
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2014-06-03 12:28:41 +0200
committerFlorian Pritz <bluewind@xinu.at>2014-06-03 12:28:41 +0200
commit3774c0948ac1216765c15ede8839f52f5fb9e7b9 (patch)
tree4b1d16df352b36cf141c8731baa37cfa3cf4b142 /sftp-mount.sh
parent7fba334e4fe21133141125ac77185ab9a0b22f2c (diff)
downloadbin-3774c0948ac1216765c15ede8839f52f5fb9e7b9.tar.gz
bin-3774c0948ac1216765c15ede8839f52f5fb9e7b9.tar.xz
misc changes
Signed-off-by: Florian Pritz <bluewind@xinu.at>
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