Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

148 linhas
3.0 KiB

  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/.gem/ruby/2.1.0/bin"
  14. __safe_add_path_l "$HOME/.local/bin"
  15. __safe_add_path_r "/c/mingw/bin"
  16. __safe_add_path_r "/c/mingw/msys/1.0/bin"
  17. export GEM_HOME="$HOME/.local/lib/gems"
  18. export RUBYLIB="$RUBYLIB:$HOME/.local/lib/gems/lib"
  19. # in my environment powerdown does not work
  20. test -z "$DISPLAY" && test -z "$SSH_CONNECTION" && \
  21. type setterm >/dev/null 2>&1 && \
  22. setterm -blank 30 -powersave on # -powerdown 10
  23. ##################################
  24. # EnvVal definitions
  25. test "$TERM" = linux && export LANG=C
  26. export LC_MESSAGES=C
  27. export LC_TIME=C
  28. export TERMCAP="${TERMCAP}:vb="
  29. # export ENV=~/.shrc
  30. export PAGER="less"
  31. export LESS="-iMRX"
  32. if false which nvim >/dev/null
  33. then
  34. _VI_ALT=nvim
  35. elif which vim >/dev/null
  36. then
  37. _VI_ALT=vim
  38. elif which vi >/dev/null
  39. then
  40. _VI_ALT=vi
  41. fi
  42. if test -n "$_VI_ALT"
  43. then
  44. export EDITOR="$_VI_ALT"
  45. export GIT_EDITOR="$EDITOR"
  46. export VISUAL="$EDITOR"
  47. fi
  48. # export CDPATH=".:~"
  49. export GIT_PAGER="less -FRX"
  50. export GIT_MERGE_AUTOEDIT=no
  51. if test -n "$TMUX" && \
  52. expr "$TERM" : screen >/dev/null && \
  53. expr "`tmux display -p '#{client_termname}'`" : '.*-256color$' >/dev/null
  54. then
  55. TERM=screen-256color
  56. fi
  57. if test -z "$USER" -a -n "$USERNAME"
  58. then
  59. export USER=$USERNAME
  60. fi
  61. # set TMP, TEMP, TMPDIR
  62. if test -z "$TMP"
  63. then
  64. if test -n "$TMPDIR"
  65. then
  66. export TMP=$TMPDIR
  67. elif test -n "$TEMP"
  68. then
  69. export TMP="$TEMP"
  70. else
  71. export TMP=/tmp
  72. fi
  73. fi
  74. __user_md5=$(perl -e "use Digest::MD5 qw(md5_hex); print md5_hex('$USER$HOSTNAME')")
  75. expr "$TMP" : ".*${__user_md5}.*" >/dev/null || export TMP="${TMP}/${__user_md5}-tmp"
  76. test -d "$TMP" || mkdir -p "$TMP"
  77. TMP="$(cd "$TMP" && pwd)"/
  78. export TEMP=$TMP
  79. export TMPDIR=$TMP
  80. if test -d ~/dbx
  81. then
  82. export CHIT_PATH="$HOME/dbx/.chit"
  83. fi
  84. export JAVA_OPTS="$JAVA_OPTS -Duser.language=en"
  85. export GOPATH="$HOME/.golang"
  86. # TODO:
  87. # export GOPATH="$HOME/.golang"
  88. export PATH="$GOPATH/bin:$PATH"
  89. export PYTHONUSERBASE=$HOME/.pip
  90. export PATH="$PYTHONUSERBASE/bin:$PATH"
  91. export PIPENV_VENV_IN_PROJECT=1
  92. export STARDICT_DATA_DIR=$HOME/.brew/share/sdcv-dict-oxford
  93. ###########################################
  94. # Host colors
  95. export _HOSTCOLOR_1=
  96. export _HOSTCOLOR_2=
  97. # black red green yellow blue magenta cyan white
  98. # Yellow is hard to read strings...
  99. case "`hostname`" in
  100. arch-vb-win8-vaio11)
  101. _HOSTCOLOR_1=magenta
  102. _HOSTCOLOR_2=white
  103. ;;
  104. darwin-mba.local)
  105. _HOSTCOLOR_1=cyan
  106. _HOSTCOLOR_2=black
  107. ;;
  108. # newkiwi)
  109. # _HOSTCOLOR_1=magenta
  110. # _HOSTCOLOR_2=white
  111. # ;;
  112. debian-vb-win7-opti)
  113. _HOSTCOLOR_1=red
  114. _HOSTCOLOR_2=white
  115. ;;
  116. *)
  117. _HOSTCOLOR_1=green
  118. _HOSTCOLOR_2=black
  119. ;;
  120. esac