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.

пре 11 година
пре 10 година
пре 11 година
пре 9 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 10 година
пре 11 година
пре 11 година
пре 11 година
пре 10 година
пре 11 година
пре 11 година
пре 11 година
пре 9 година
пре 9 година
пре 11 година
пре 11 година
пре 10 година
пре 10 година
пре 10 година
пре 9 година
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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. __safe_add_path_l "/usr/local/Homebrew/bin"
  25. test -f "${__dotdir}/rc.py" && export PYTHONSTARTUP="${__dotdir}/rc.py"
  26. test -d "$HOME/.local/lib/python/site-packages" && \
  27. export PYTHONPATH="${PYTHONPATH}:${HOME}/.local/lib/python/site-packages"
  28. export GEM_HOME="$HOME/.local/lib/gems"
  29. export RUBYLIB="$RUBYLIB:$HOME/.local/lib/gems/lib"
  30. # it is not so good
  31. # http://archive.linux.or.jp/JF/JFdocs/Program-Library-HOWTO/shared-libraries.html
  32. # http://superuser.com/questions/324613/installing-a-library-locally-in-home-directory-but-program-doesnt-recognize-it
  33. # without this ENV i cannot run tmux. another way is to use --disable-shared
  34. # when building tmux
  35. export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/.local/lib"
  36. # in my environment powerdown does not work
  37. test -z "$DISPLAY" && test -z "$SSH_CONNECTION" && \
  38. type setterm >/dev/null 2>&1 && \
  39. setterm -blank 30 -powersave on # -powerdown 10
  40. ##################################
  41. # EnvVal definitions
  42. test "$TERM" = linux && export LANG=C
  43. export LC_MESSAGES=C
  44. export LC_TIME=C
  45. export TERMCAP="${TERMCAP}:vb="
  46. # export ENV=~/.shrc
  47. export PAGER="less"
  48. export LESS="-iRMX"
  49. # Style for lesspipe is defined in esc.style
  50. _src_hilite_lp_path="`command -v src-hilite-lesspipe.sh 2>/dev/null`"
  51. for f in /usr/share/source-highlight/src-hilite-lesspipe.sh
  52. do
  53. test -z "$_src_hilite_lp_path" && test -e "$f" && _src_hilite_lp_path="$f"
  54. done
  55. test -n "$_src_hilite_lp_path" && export LESSOPEN="| $_src_hilite_lp_path %s"
  56. if false which nvim >/dev/null
  57. then
  58. _VI_ALT=nvim
  59. elif which vim >/dev/null
  60. then
  61. _VI_ALT=vim
  62. elif which vi >/dev/null
  63. then
  64. _VI_ALT=vi
  65. fi
  66. if test -n "$_VI_ALT"
  67. then
  68. export EDITOR="$_VI_ALT"
  69. export GIT_EDITOR="$EDITOR"
  70. export VISUAL="$EDITOR"
  71. fi
  72. # export CDPATH=".:~"
  73. export GIT_PAGER="less -F"
  74. export GIT_MERGE_AUTOEDIT=no
  75. if test -n "$TMUX" && \
  76. expr "$TERM" : screen >/dev/null && \
  77. expr "`tmux display -p '#{client_termname}'`" : '.*-256color$' >/dev/null
  78. then
  79. TERM=screen-256color
  80. fi
  81. if test -z "$USER" -a -n "$USERNAME"
  82. then
  83. export USER=$USERNAME
  84. fi
  85. # set TMP, TEMP, TMPDIR
  86. if test -z "$TMP"
  87. then
  88. if test -n "$TMPDIR"
  89. then
  90. export TMP=$TMPDIR
  91. elif test -n "$TEMP"
  92. then
  93. export TMP="$TEMP"
  94. else
  95. export TMP=/tmp
  96. fi
  97. fi
  98. expr "$TMP" : ".*$USER-tmp" >/dev/null || export TMP="${TMP}/${USER}-tmp"
  99. export TEMP=$TMP
  100. export TMPDIR=$TMP
  101. test -d "$TMP" || mkdir -p "$TMP"
  102. if test -d ~/dbx
  103. then
  104. export CHIT_PATH="$HOME/dbx/.chit"
  105. fi
  106. export JAVA_OPTS="$JAVA_OPTS -Duser.language=en"
  107. export GOPATH="$HOME/my/go"
  108. export PATH="$GOPATH/bin:$PATH"
  109. ###########################################
  110. # Host colors
  111. export _HOSTCOLOR_1=
  112. export _HOSTCOLOR_2=
  113. # black red green yellow blue magenta cyan white
  114. # Yellow is hard to read strings...
  115. case "`hostname`" in
  116. arch-vb-win8-vaio11)
  117. _HOSTCOLOR_1=magenta
  118. _HOSTCOLOR_2=white
  119. ;;
  120. darwin-mba.local)
  121. _HOSTCOLOR_1=cyan
  122. _HOSTCOLOR_2=black
  123. ;;
  124. newkiwi)
  125. _HOSTCOLOR_1=magenta
  126. _HOSTCOLOR_2=white
  127. ;;
  128. debian-vb-win7-opti)
  129. _HOSTCOLOR_1=red
  130. _HOSTCOLOR_2=white
  131. ;;
  132. *)
  133. _HOSTCOLOR_1=green
  134. _HOSTCOLOR_2=black
  135. ;;
  136. esac