#!/usr/bin/env bash # parse command line arguments for i in "$@"; do case $i in -h|--help) echo $helptext exit 0 ;; esac done # make sure FREESURFER_HOME is set if [[ -z "$FREESURFER_HOME" ]]; then echo "error: FREESURFER_HOME must be set" exit 1 fi # get any course-specific freesurfer patches rsync -rtv rsync://surfer.nmr.mgh.harvard.edu/pub/data/course_data/freesurfer-patch/$(uname)/ $FREESURFER_HOME # get the course-laptop bashrc file rsync -tv rsync://surfer.nmr.mgh.harvard.edu/pub/data/course_data/bashrc ~/.bashrc # get the tutorial scripts rsync -tv rsync://surfer.nmr.mgh.harvard.edu/pub/data/course_data/fs_tutorial_data $FREESURFER_HOME/bin/ rsync -tv rsync://surfer.nmr.mgh.harvard.edu/pub/data/course_data/fs_run_tutorials $FREESURFER_HOME/bin/ # finally, update this script (make sure this command is run last just to be safe) rsync -tv rsync://surfer.nmr.mgh.harvard.edu/pub/data/course_data/fs_update $FREESURFER_HOME/bin/