#!/bin/bash
#
# Mount a cluster home folder to the local filesystem.
#
# This script will need to be re-run every time your computer reboots.
#

# change this to your JMU e-ID
JMU_EID=lam2mo

# auto-detect your local user name
USER_NAME="$(whoami)"

# change this if you wish for your cluster home folder to be anywhere other than
# "cluster" in your local home folder
MOUNT_PATH=$HOME/cluster

# ensure mount path exists
mkdir -p "$MOUNT_PATH"

# mount remote filesystem
sshfs -o idmap=user -o ssh_command="ssh -J $JMU_EID@stu.cs.jmu.edu" "$JMU_EID@login02.cluster.cs.jmu.edu:/nfs/home/$JMU_EID" "$MOUNT_PATH"

