Skip to content

Instantly share code, notes, and snippets.

@SeanHood
Last active October 27, 2016 23:31
Show Gist options
  • Save SeanHood/124765293e618da97efa9138a5709c70 to your computer and use it in GitHub Desktop.
Save SeanHood/124765293e618da97efa9138a5709c70 to your computer and use it in GitHub Desktop.
#!/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!"
@SeanHood
Copy link
Author

SeanHood commented Sep 1, 2016

Usage:

./mount-sshfs.sh server /path/to/mount

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment