#!/bin/bash # .bashrc-private #------------------------------------------------------------------------------# # # Private stuff for interactive shells. # #------------------------------------------------------------------------------# # Uncomment the following when tracing shell startup #echo ".bashrc-private run by $$ at `date +'%Y%m%d-%H:%M:%S'`" >> $HOME/suslog #------------------------------------------------------------------------------# # Source .bashrc-ni to get the definitions needed by both interactive and # non-interactive shells, especially PATH and LD_LIBRARY_PATH #------------------------------------------------------------------------------# # if [ -f $HOME/.bashrc-ni-private ] ; then # . $HOME/.bashrc-ni-private # fi #------------------------------------------------------------------------------# # CHECK Interactive Shell environment #------------------------------------------------------------------------------# if [ -n "$PS1" ] ; then # Uncomment the following when tracing shell startup # echo "... $$ is an interactive shell for `who -m`" >> $HOME/suslog #------------------------------------------------------------------------------# # BEGIN "if-def wrap" #------------------------------------------------------------------------------# if [ "$BASHRC_P_DONE" != "$$" ] ; then export BASHRC_P_DONE="$$" # Uncomment the following when tracing shell startup # echo "... $$ setting BASHRC_P_DONE to $BASHRC_P_DONE" >> $HOME/suslog # this is in case you really need to rerun this (e.g. after modifying it) function resetbp { export BASHRC_P_DONE="" } #------------------------------------------------------------------------------# # BEGIN your stuff goes here #------------------------------------------------------------------------------# # shortcuts for VNC alias vncbeg="vncserver :11" alias vncend="vncserver -kill :11" alias vnccln="rm -f /tmp/.X11-unix/X11" # this helps when resolving cvs merge conflicts alias findcr="find . -name '.#*'" # start a remote xterm function sshterm { ssh -fY $1 xterm } # navigation within development environment # environment variables are defined in .bashrc-ni alias godev="go $DEVEL" alias gongscripts="go $DEV_NGSCRIPTS" alias gongstartup="go $DEV_NGSTARTUP" alias goamex="go $AMEX" alias goamexc="go $AMEX/c" alias goamexd="go $AMEX/data" alias goamexp="go $AMEX/c/public" alias goamexbin="go $AMEX_HOME/bin" alias goamexdat="go $AMEX_HOME/data/amex" alias goapubdat="go $AMEX_HOME/data/public" function gpid { pa=( $(find /proc -maxdepth 2 -name "exename" -exec grep -q "$1" {} \; -print) ) if [ "${#pa[@]}" -gt "0" ] ; then echo $(basename $(dirname ${pa[0]})) else echo "0" fi } function rs { if [ -z "$AMEX_HOME" ] ; then echo "You must set AMEX_HOME" else rpwd=$PWD cd $AMEX_HOME/bin runlog="$(date +'%Y%m%d%H%M%S').log" ./server 9090 > $rpwd/$runlog & echo "Server started as process" $(gpid "bin/server") echo "Logging to $runlog" cd $rpwd fi } function ks { echo -n "Killing server... " spid=$(gpid "bin/server") if [ "$spid" -ne "0" ] ; then kill -9 $spid echo "$spid terminated" else echo "no running server found" fi } # alias rs="cd $AMEX_HOME/bin; ./server 9090 &" alias rt="$AMEX_HOME/bin/testmain" function rmil { find $1 -name "install.*.log" -print0 | xargs -0r rm } # navigation within HTTP DOCROOT # environment variables are defined in .bashrc-ni alias gohttp="go $HTDOC" alias gotiki="go $TIKITEST" # SSH aliases (except for fangorn, these only work from within MiSTICKE.NET) alias fangorn="ssh awcolley@fangorn" alias gandalf="ssh awcolley@gandalf" alias radagast="ssh awcolley@radagast" alias saruman="ssh awcolley@saruman" alias frodo="ssh awcolley@frodo" alias samwise="ssh awcolley@samwise" alias meriadoc="ssh awcolley@meriadoc" alias peregrin="ssh awcolley@peregrin" # Set display if not local # if who -m | grep -q "155.104.44.39" ; then # export DISPLAY=155.104.44.39:0.0 # fi # Set .ssh/config if on depa126992 # if hostname | grep -q "depa126992" ; then # ln -sf $HOME/.ssh/config-depa126992 $HOME/.ssh/config # function fixssh { # ln -sf $HOME/.ssh/config-depa126992 $HOME/.ssh/config # } # else # ln -sf $HOME/.ssh/config-msticke $HOME/.ssh/config # function fixssh { # ln -sf $HOME/.ssh/config-msticke $HOME/.ssh/config # } # fi # WEBSITE stuff # environment variables are defined in .bashrc-ni-private alias goawc="go $AWCFAMILY" alias goqtc="go $ACQTC" alias awcftp="ncftp awcfamily" alias qtcftp="ncftp acqtc" alias awcssh="ssh awcfam83@awcfamily.com" alias qtcssh="ssh acqtc@acqtc.com" alias awcdir="rsync awcfam83@awcfamily.com:" alias qtcdir="rsync acqtc@acqtc.com:" function awcget { rsync -arltvz --exclude-from=$HOME/etc/awcex awcfam83@awcfamily.com:$1 . } function awcput { rsync -arltvz --exclude-from=$HOME/etc/awcex $1 awcfam83@awcfamily.com:`dirname $1` } function awcputd { rsync -arltvz --exclude-from=$HOME/etc/awcex --delete $1 awcfam83@awcfamily.com:`dirname $1` } function qtcget { rsync -arltvz --exclude-from=$HOME/etc/qtcex acqtc@acqtc.com:$1 . } function qtcput { rsync -arltvz --exclude-from=$HOME/etc/qtcex $1 acqtc@acqtc.com:`dirname $1` } function qtcputd { rsync -arltvz --exclude-from=$HOME/etc/qtcex --delete $1 acqtc@acqtc.com:`dirname $1` } # aliases for building packages alias cpul="configure --prefix=/usr/local" alias itag="touch INSTALLED-`hostname`-`date +%Y%m%d.%H%M`" alias sumi="su -c 'make install'" # SAPgui export PLATIN_JAVA=/usr/local/j2sdk1.4.2_06/bin/java export PLATIN_JAVA_VER=1.4.2 alias sapgui=$HOME/SAPGUI/6.20rev8/bin/guilogon #------------------------------------------------------------------------------# # END your stuff goes here #------------------------------------------------------------------------------# #------------------------------------------------------------------------------# # END "if-def wrap" #------------------------------------------------------------------------------# fi #------------------------------------------------------------------------------# # END CHECK Interactive Shell environment #------------------------------------------------------------------------------# fi