Skip to content

Instantly share code, notes, and snippets.

@stowler
Created August 12, 2013 16:25
Show Gist options
  • Save stowler/6212500 to your computer and use it in GitHub Desktop.
Save stowler/6212500 to your computer and use it in GitHub Desktop.
afniSwitchToRepo.sh - switch the user back to the neurodebian repository version of AFNI
#!/bin/bash
# afniSwitchToRepo.sh
#
# A script to switch the user back to the neurodebian repo version of AFNI from a
# local alternative install (e.g., /opt/abin). Works in combination with
# afniSwitchFromRepo.sh
echo ""
echo "Switching back to the repo version of AFNI:"
# first clear any afni environmental variables:
unset `env | awk -F= '/AFNI/ {print $1}' | xargs`
# restore the $PATH that contained the repo version of AFNI:
export PATH=${afniRepoVersionOfPATH}
# re-initialize the typical environment via /etc/bash.bashrc:
. /etc/bash.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment