#!/usr/bin/env bash set -euo pipefail sshMount () { clientUser=$(whoami); serverUser=$1; serverHost=$2; shift 2; args=($@) for ((i=0; i < ${#args[@]}; i=i + 2)); do sshfs ${serverUser}@${serverHost}:/citadel/${args[$i]}/ /home/${clientUser}/${args[$i + 1]}/ -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=8 done }