1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- #!/bin/bash
-
- ### .... ###
- ### BASH ###
- ### '''' ###
-
- make_ps1h() {
- echo "$red\h$normal";
- }
-
- # my tools as aliases
- alias winpdb="$HOME/local/winpdb/winpdb"
- alias node="$HOME/local/node/bin/node"
- alias npm="$HOME/local/node/bin/npm"
- alias tap="./node_modules/tap/bin/tap.js"
- alias tap-reader="./node_modules/tap/bin/tap-reader.js"
-
- alias diff="colordiff -u"
-
-
- ### ...... ###
- ### OTHERS ###
- ### '''''' ###
-
- # tame minions
- export PERL5LIB="$PERL5LIB:$HOME/lib/minions/lib"
- export PERL5LIB="$PERL5LIB:$HOME/local/gnucash-importer/lib"
-
- export EDITOR='vim'
-
- ### ................ ###
- ### SET UP SSH-AGENT ###
- ### '''''''''''''''' ###
-
- # http://mah.everybody.org/docs/ssh#run-ssh-agent
-
- SSH_ENV="$HOME/.ssh/environment"
-
- function start_agent {
- echo "Initialising new SSH agent..."
- /usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"
- echo succeeded
- chmod 600 "${SSH_ENV}"
- . "${SSH_ENV}" > /dev/null
- /usr/bin/ssh-add;
- }
-
- # Source SSH settings, if applicable
-
- if [ -f "${SSH_ENV}" ]; then
- . "${SSH_ENV}" > /dev/null
- #ps ${SSH_AGENT_PID} doesn't work under cywgin
- ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || {
- start_agent;
- }
- else
- start_agent;
- fi
|