Created
July 7, 2012 12:45
-
-
Save intarstudents/3066371 to your computer and use it in GitHub Desktop.
SSHFS mount script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Default ssh port | |
PORT=22 | |
# If secound argument is number use it as PORT | |
if [ "$2" != "" ] && [[ $2 != *[!0-9]* ]] ; then | |
PORT=$2 | |
fi | |
mkdir -p $HOME/Mount/$1 | |
sshfs -p $PORT $1:/ $HOME/Mount/$1 -oauto_cache,volname=$1,defer_permissions,jail_symlinks,noappledouble |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment