Last active
October 27, 2016 23:31
-
-
Save SeanHood/124765293e618da97efa9138a5709c70 to your computer and use it in GitHub Desktop.
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 | |
if [ -z "$2" ]; then echo -e "Missing arguments\nUsage: mount-sshfs server /path/to/mount"; exit 1; fi | |
server=$1 | |
dir=$2 | |
mountdir="/Volumes/${server}-$(basename $2)" | |
mkdir $mountdir | |
sshfs -o defer_permissions ${server}:${2} $mountdir -ovolname="${2} on ${1}" > /dev/null 2>&1 && echo "Success! See ${mountdir}" || echo "Fail!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage: