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.

пре 10 година
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. #!/bin/sh
  2. # profile --- 10sr profile
  3. __safe_add_path_r(){
  4. # add path to right
  5. test -d "$1" && PATH="${PATH}:$1"
  6. }
  7. __safe_add_path_l(){
  8. # add path to left
  9. test -d "$1" && PATH="$1:${PATH}"
  10. }
  11. __safe_add_path_l "$HOME/.cabal/bin"
  12. __safe_add_path_l "$HOME/.local/lib/gems/bin"
  13. __safe_add_path_l "$HOME/.local/bin"
  14. __safe_add_path_l "$HOME/.gem/ruby/2.1.0/bin"
  15. __safe_add_path_r "/c/mingw/bin"
  16. __safe_add_path_r "/c/mingw/msys/1.0/bin"
  17. # macports coreutils
  18. # $isdarwin cannot be used it is not defined yet
  19. __safe_add_path_l "/opt/local/bin"
  20. __safe_add_path_l "/opt/local/sbin"
  21. __safe_add_path_l "/opt/local/libexec/gnubin"
  22. __safe_add_path_l \
  23. "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/bin"
  24. test -f "${__dotdir}/rc.py" && export PYTHONSTARTUP="${__dotdir}/rc.py"
  25. test -d "$HOME/.local/lib/python/site-packages" && \
  26. export PYTHONPATH="${PYTHONPATH}:${HOME}/.local/lib/python/site-packages"
  27. export GEM_HOME="$HOME/.local/lib/gems"
  28. export RUBYLIB="$RUBYLIB:$HOME/.local/lib/gems/lib"
  29. # it is not so good
  30. # http://archive.linux.or.jp/JF/JFdocs/Program-Library-HOWTO/shared-libraries.html
  31. # http://superuser.com/questions/324613/installing-a-library-locally-in-home-directory-but-program-doesnt-recognize-it
  32. # without this ENV i cannot run tmux. another way is to use --disable-shared
  33. # when building tmux
  34. if ! __match "$LD_LIBRARY_PATH" "$HOME/.local/lib"
  35. then
  36. export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/.local/lib"
  37. fi
  38. # in my environment powerdown does not work
  39. test -z "$DISPLAY" && test -z "$SSH_CONNECTION" && \
  40. type setterm >/dev/null 2>&1 && \
  41. setterm -blank 30 -powersave on # -powerdown 10
  42. ##################################
  43. # EnvVal definitions
  44. test "$TERM" = linux && export LANG=C
  45. export LC_MESSAGES=C
  46. export LC_TIME=C
  47. export TERMCAP="${TERMCAP}:vb="
  48. # export ENV=~/.shrc
  49. export PAGER="less"
  50. export LESS="-iRMX"
  51. # Style for lesspipe is defined in esc.style
  52. _src_hilite_lp_path="`command -v src-hilite-lesspipe.sh 2>/dev/null`"
  53. for f in /usr/share/source-highlight/src-hilite-lesspipe.sh
  54. do
  55. test -z "$_src_hilite_lp_path" && test -e "$f" && _src_hilite_lp_path="$f"
  56. done
  57. test -n "$_src_hilite_lp_path" && export LESSOPEN="| $_src_hilite_lp_path %s"
  58. if null type vim
  59. then
  60. export EDITOR=vim
  61. else
  62. export EDITOR=vi
  63. fi
  64. # export CDPATH=".:~"
  65. export VISUAL="$EDITOR"
  66. export GIT_PAGER="less -F"
  67. export GIT_EDITOR="$EDITOR"
  68. export GIT_MERGE_AUTOEDIT=no
  69. if test -n "$TMUX" && \
  70. __match $TERM screen && \
  71. __match `tmux display -p '#{client_termname}'` 256color
  72. then
  73. TERM=screen-256color
  74. fi
  75. # set TMP, TEMP, TMPDIR
  76. if test -z "$TMP"
  77. then
  78. if test -n "$TMPDIR"
  79. then
  80. export TMP=$TMPDIR
  81. elif test -n "$TEMP"
  82. then
  83. export TMP="$TEMP"
  84. else
  85. export TMP=/tmp
  86. fi
  87. fi
  88. __match "$TMP" "${USER}-tmp" >/dev/null || TMP="${TMP}/${USER}-tmp"
  89. test -d "$TMP" || mkdir -p "$TMP"
  90. export TEMP=$TMP
  91. export TMPDIR=$TMP
  92. if test -d ~/dbx
  93. then
  94. export CHIT_PATH="$HOME/dbx/.chit"
  95. fi