Created
July 28, 2015 11:43
-
-
Save szalai1/6e74b01324dea265bbfb to your computer and use it in GitHub Desktop.
sshfs
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
function mount_sshfs_if_needed { | |
if [ "$(df -P "$2")" == "$(df -P "$2/..")" ]; then | |
command=(sshfs -o idmap=user $1 $2) | |
echo "${command[@]}" | |
"${command[@]}" | |
fi | |
} | |
mount_sshfs_if_needed $USER@info:/mnt/idms /home/$USER/idms |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment