123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- #!/bin/bash
-
- ### .... ###
- ### BASH ###
- ### '''' ###
-
- make_ps1h() {
- echo "$red\h$normal";
- }
-
- # my tools as aliases
- alias se="$HOME/bin/se"
- alias mkexec="$HOME/bin/mkexec.pl"
- alias cgo="$HOME/bin/cgo"
- alias opera-study="$HOME/bin/opera-study"
- alias opera-dwww="$HOME/bin/opera-dwww"
- 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 git='~/bin/git'
-
- # keep modified stamps for some files
- alias vim='~/bin/vim-bx.pl'
-
- alias Markdown='~/bin/Markdown'
- alias diff="colordiff"
-
- # from minions
- alias autotest.pl='~/bin/autotest.pl'
- alias watchdump.pl='~/bin/watchdump.pl'
-
- # Linux counter
- alias lico-update.sh='~/bin/lico-update.sh'
-
-
- ### ...... ###
- ### OTHERS ###
- ### '''''' ###
-
- # tame minions
- export PERL5LIB="$PERL5LIB:$HOME/lib/minions/lib"
-
- # Add RVM to PATH for scripting
- export PATH=$PATH:$HOME/.rvm/bin
-
- 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
-
- ### .................. ###
- ### RUN BYOBU IF SSH'D ###
- ### '''''''''''''''''' ###
-
- # (but only it this is a login shell)
-
- if shopt -q login_shell
- then
- if [ -n "$SSH_CONNECTION" ]
- then
- byobu
- exit
- fi
- fi
|