My dotfiles. Period.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #!/bin/bash
  2. ### .... ###
  3. ### BASH ###
  4. ### '''' ###
  5. make_ps1h() {
  6. echo "$red\h$normal";
  7. }
  8. # my tools as aliases
  9. alias winpdb="$HOME/local/winpdb/winpdb"
  10. alias node="$HOME/local/node/bin/node"
  11. alias npm="$HOME/local/node/bin/npm"
  12. alias tap="./node_modules/tap/bin/tap.js"
  13. alias tap-reader="./node_modules/tap/bin/tap-reader.js"
  14. alias diff="colordiff -u"
  15. ### ...... ###
  16. ### OTHERS ###
  17. ### '''''' ###
  18. # tame minions
  19. export PERL5LIB="$PERL5LIB:$HOME/lib/minions/lib"
  20. export PERL5LIB="$PERL5LIB:$HOME/local/gnucash-importer/lib"
  21. export EDITOR='vim'
  22. ### ................ ###
  23. ### SET UP SSH-AGENT ###
  24. ### '''''''''''''''' ###
  25. # http://mah.everybody.org/docs/ssh#run-ssh-agent
  26. SSH_ENV="$HOME/.ssh/environment"
  27. function start_agent {
  28. echo "Initialising new SSH agent..."
  29. /usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"
  30. echo succeeded
  31. chmod 600 "${SSH_ENV}"
  32. . "${SSH_ENV}" > /dev/null
  33. /usr/bin/ssh-add;
  34. }
  35. # Source SSH settings, if applicable
  36. if [ -f "${SSH_ENV}" ]; then
  37. . "${SSH_ENV}" > /dev/null
  38. #ps ${SSH_AGENT_PID} doesn't work under cywgin
  39. ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || {
  40. start_agent;
  41. }
  42. else
  43. start_agent;
  44. fi