CLI config/dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

121 lines
4.7 KiB

  1. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2. # .zshenv
  3. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  4. # User-specific ~/.zshenv, generalized for GNU/Linux and Apple OS X
  5. # Excecuted by zsh for all ((non-)interactive) shells
  6. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  7. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  8. # Determine local environment
  9. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  10. case $( uname ) in
  11. ( *[Ll]inux* )
  12. case "$HOSTNAME" in
  13. ( vmp* ) hostenv='cluster';; # Auto-detect whether we're running on the
  14. ( vpac* ) hostenv='astro';; # ACCRE cluster or the VPAC network at
  15. ( * ) hostenv='linux';; # Vanderbilt, and set options appropriately
  16. esac;;
  17. ( *[Dd]arwin* ) hostenv='osx';;
  18. ( * ) echo 'running on unknown host' && return;;
  19. esac
  20. export hostenv
  21. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  22. # Path definitions
  23. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  24. typeset -U path
  25. case "$hostenv" in
  26. ( cluster )
  27. path=(/usr/local/supermongo/bin # Supermongo path
  28. /usr/local/cuda/bin # Nvidia CUDA path
  29. /usr/lpp/mmfs/bin # GPFS utilities path
  30. ~/local/bin # User-specific path
  31. $path)
  32. export -UT LD_LIBRARY_PATH=/usr/scheduler/torque/lib:$LD_LIBRARY_PATH ld_library_path
  33. export -UT LD_LIBRARY_PATH=/usr/local/supermongo/lib:$LD_LIBRARY_PATH ld_library_path
  34. export -UT LD_LIBRARY_PATH=/usr/local/python/lib:$LD_LIBRARY_PATH ld_library_path
  35. export -UT LD_LIBRARY_PATH=/usr/local/cuda/lib:$LD_LIBRARY_PATH ld_library_path
  36. export -UT PYTHONPATH=~/local/lib/python/site-packages:$PYTHONPATH pythonpath
  37. export -UT IDL_STARTUP=~/.idl/idl_startup.pro idl_starup
  38. export -UT IDL_PATH=+/home/sinham/utils/idl:$IDL_PATH idl_path
  39. export -UT IDL_PATH=.:+/usr/local/idl/idl/lib:+/usr/local/idl/idl/:$IDL_PATH idl_path
  40. ;;
  41. ( astro )
  42. path=(/usr/local/python64/bin # Python path (64 bit)
  43. ~/local/bin # User specific path
  44. $path)
  45. export -UT LD_LIBRARY_PATH=/usr/local/python64/lib:$LD_LIBRARY_PATH ld_library_path
  46. export -UT PYTHONPATH=~/local/lib/python/latest/site-packages:$PYTHONPATH pythonpath
  47. export -UT PYTHONPATH=/usr/local/python64/lib/python*/site-packages:$PYTHONPATH pythonpath
  48. source /usr/local/itt/idl80/idl/bin/idl_setup.bash
  49. export IDL_PATH=.:/home/sinham/psu/utils/idl/:+$IDL_DIR
  50. export IDL_STARTUP=~/.idl/idl_startup.pro
  51. ;;
  52. ( linux )
  53. path=(~/Local/bin $path) # User specific path
  54. export -UT PYTHONPATH=~/Local/lib/python/python-2.7/site-packages:$PYTHONPATH pythonpath
  55. export -UT PYTHONPATH=~/Local/lib/python/latest/site-packages:$PYTHONPATH pythonpath
  56. export -UT PYTHONPATH=~/Local/lib/python3/site-packages:$PYTHONPATH pythonpath
  57. export -UT TEXINPUTS=.:./style:$TEXINPUTS texinputs
  58. export -UT BSTINPUTS=.:./style:$BSTINPUTS bstinputs
  59. export -UT BIBINPUTS=.:./style:$BIBINPUTS bibinputs
  60. ;;
  61. ( osx )
  62. path=(~/Local/bin # User specific path
  63. /usr/local/opt/coreutils/libexec/gnubin # Gnu coreutils from Homebrew
  64. /usr/local/opt/findutils/libexec/gnubin # Gnu find from Homebrew
  65. /usr/local/opt/grep/libexec/gnubin # Gnu grep from Homebrew
  66. /usr/local/opt/gnu-sed/libexec/gnubin # Gnu sed from Homebrew
  67. /usr/local/opt/gnu-indent/libexec/gnubin # Gnu indent from Homebrew
  68. /usr/local/opt/gnu-tar/libexec/gnubin # Gnu tar from Homebrew
  69. /usr/local/opt/python/libexec/bin # Unversioned python3
  70. $path)
  71. export -UT PYTHONPATH=~/Local/lib/python/latest/site-packages:$PYTHONPATH pythonpath
  72. ;;
  73. esac
  74. export path
  75. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  76. # Import packages
  77. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  78. if [[ $hostenv == cluster ]]; then
  79. setpkgs -a gcc_compiler
  80. setpkgs -a intel_compiler
  81. setpkgs -a fftw2-mpich2_gcc_ether
  82. setpkgs -a mpich2_gcc_ether
  83. setpkgs -a gsl_gcc
  84. setpkgs -a gsl_intel
  85. setpkgs -a hdf5
  86. setpkgs -a valgrind
  87. setpkgs -a python
  88. setpkgs -a scipy
  89. setpkgs -a perl
  90. setpkgs -a idl-8.0
  91. setpkgs -a matlab
  92. setpkgs -a octave
  93. setpkgs -a R
  94. setpkgs -a ImageMagick
  95. fi
  96. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  97. # End
  98. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~