1 if [ -z "$_home_short_dotbashrc" ];then
2 _home_short_dotbashrc=true
4 if [ -f /etc/bashrc ];then source /etc/bashrc;fi
6 function _bash_profile_addpath # variable,dirpathname
8 if [ '!' -d "$2" ];then return;fi
9 if [ -n "$3" -o -z "`eval "echo \\${$1}"`" ];then
12 # we want to override any original directories, place dirpathname first!
13 eval "$1=\"$2:\${$1}\""
18 _bash_profile_addpath PATH "$HOME/bin"
19 _bash_profile_addpath PATH "$HOME/sbin"
20 _bash_profile_addpath LD_LIBRARY_PATH "$HOME/lib"
21 _bash_profile_addpath MANPATH "$HOME/man"
23 _bash_profile_addpath CVSROOT "$HOME/cvs" single
24 _bash_profile_addpath CVSROOT "$HOME/pserver/cvs" single
26 for _perldir in $(eval "echo $HOME/lib/perl5/site_perl$(
27 for perlvar in version archname;do
29 perl -V:"$perlvar"|cut -d "'" -f 2|tr -d '\n'
33 _bash_profile_addpath PERLLIB "$_perldir"
37 unset -f _bash_profile_addpath
41 alias maple="ssh -t vega.fjfi.cvut.cz maple"
42 #alias cc='cc -I/home/short/include'
45 weberr="/var/log/httpd/error/klokan.error_log"
46 if [ -f "$weberr" ];then alias weberr='tail "$weberr"';fi
47 weblog="/var/log/httpd/klokan.access_log"
48 if [ -f "$weblog" ];then alias weblog='tail -n 20000 "$weblog"|grep "\\(~\\|%7[eE]\\)short"';fi
53 export LC_CTYPE=cs_CZ.ISO-8859-2
54 export PERL_MM_OPT="PREFIX=$HOME"
55 export WWW_HOME="file:///home/short/.bookmarks.html"
56 export GREP_OPTIONS="--binary-files=without-match --directories=skip"
58 function cvsdiff { cvs diff "$@" 2>&1| less; }; export -f cvsdiff
59 function cvsdiffi { cvs diff "$@" 2>&1|grep -v '^?'|less; }; export -f cvsdiffi
60 function cvsupdate { cvs update "$@" 2>&1| less; }; export -f cvsupdate
61 function cvsupdatei { cvs update "$@" 2>&1|grep -v '^?'|less; }; export -f cvsupdatei
63 for i in `find . -name Entries|grep '/CVS/Entries$'`;do
64 j="`echo "$i"|sed 's,CVS/Entries$,,'`"
65 sed -n 's,^/\([^/]*\)/[^-].*$,'"$j"'\1,p' <$i
70 for i in `find . -name .cvsignore`;do
71 j="`echo "$i"|sed 's,\.cvsignore$,,'`"
72 sed -n 's,^.*$,'"$j"'&,p' <$i
74 }; export -f cvsignore
75 function cvsignorerm { cvsignore | xargs rm -f; }; export -f cvsignorerm
77 function wclines { awk '{x[$0]++}END{for (i in x) print x[i]"\t"i}'; }; export -f wclines
78 function ulimitme { ulimit -m 100000 -d 150000 -v 200000; }; export -f ulimitme
79 function grep { ( ulimitme; `which grep` "$@"; ); }; export -f grep
80 function rsync { `which rsync` -v -e ssh --progress --stats --partial "$@"; }; export -f rsync
84 if [ -f "$HOME/.bashrc.local" ];then source "$HOME/.bashrc.local";fi
86 unset _home_short_dotbashrc # permit later reinitializations
87 fi # _home_short_dotbashrc