bashrc 491 B

12345678910111213141516171819202122
  1. # .bashrc
  2. configure_ecearth()
  3. {
  4. if [ `hostname` != "frontal1" ]; then
  5. echo "First, we move to frontal1..."
  6. touch .configure_ecearth
  7. ssh frontal1
  8. fi
  9. export EC_DEP=/projects/acad/ecearth/opt
  10. if [ -f $EC_DEP/modules ]; then
  11. source $EC_DEP/modules
  12. fi
  13. }
  14. if [ `hostname` = "frontal3" ]; then
  15. echo "Nothing to load..."
  16. fi
  17. if [ `hostname` = "frontal1" ]; then
  18. [[ -f .configure_ecearth ]] && configure_ecearth
  19. [[ -f .configure_ecearth ]] && rm .configure_ecearth
  20. fi