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.

125 lines
5.0 KiB

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