Mercurial > index.cgi > dotfiles
comparison .bashrc @ 1:7e33b3191cf7
Merged in settings from home, and at the same time edited some of the
tests to be easier to read and make more sense. Also added a lot more
comments both for others to read if I post these, and for myself to
remember if I'm less caffeinated.
author | huston@80426f53-59d1-405d-934b-f07cd76f4a1a |
---|---|
date | Fri, 10 Apr 2009 20:02:33 +0000 |
parents | c78481cfb082 |
children | 072b183989e0 |
comparison
equal
deleted
inserted
replaced
0:c78481cfb082 | 1:7e33b3191cf7 |
---|---|
1 # .bashrc | 1 # .bashrc |
2 # This file is sourced for shells which are interactive but not a | |
3 # login shell; however, since it is also sourced within | |
4 # ~/.bash_profile, the end result is that this file is sourced for all | |
5 # shells. | |
2 | 6 |
3 # User specific aliases and functions | |
4 | 7 |
5 # Source global definitions | 8 # Source global definitions |
6 if [ -f /etc/bashrc ]; then | 9 if [ -f /etc/bashrc ]; then |
7 . /etc/bashrc | 10 . /etc/bashrc |
8 fi | 11 fi |
12 | |
13 # User specific aliases and functions | |
9 if [ -f $HOME/.bash_aliases ]; then | 14 if [ -f $HOME/.bash_aliases ]; then |
10 . $HOME/.bash_aliases | 15 . $HOME/.bash_aliases |
11 fi | 16 fi |
12 | 17 |
18 # Environment variables | |
13 export PS1='\h:\w\$ ' | 19 export PS1='\h:\w\$ ' |
14 #if [ "$SSH2_AUTH_SOCK" != "" -a "X$SSH_AUTH_SOCK" = "X" ] ; then | 20 export EDITOR=vim |
15 # export SSH_AUTH_SOCK=$SSH2_AUTH_SOCK | |
16 #fi | |
17 | 21 |
18 # Add local Perl crap | 22 # Paths |
19 [[ "$PERL5LIB" =~ "/home/huston/perl" ]] || export PERL5LIB=/home/huston/perl${PERL5LIB:+:$PERL5LIB} | |
20 [[ "$MANPATH" =~ "/home/huston/perl/share/man" ]] || export MANPATH=~/perl/share/man:${MANPATH:+$MANPATH} | |
21 [[ "$PATH" =~ "/home/huston/perl/bin" ]] || export PATH=~/perl/bin${PATH:+:$PATH} | |
22 | 23 |
23 # Get the local install paths setup nicely | 24 # Standard-ish paths; some of these may be in place already, but if |
25 # they're not they should probably go near the front of the pack. | |
26 for P in /sbin /usr/sbin /usr/local/sbin /usr/local/bin ; do | |
27 [[ "$PATH" =~ $P ]] || \ | |
28 export PATH=${P}${PATH:+:$PATH} | |
29 done | |
30 | |
31 # Local Perl install | |
32 if [ -d ~/perl ]; then | |
33 [[ "$PERL5LIB" =~ ~/perl ]] || \ | |
34 export PERL5LIB=~/perl${PERL5LIB:+:$PERL5LIB} | |
35 | |
36 if [ -d ~/perl/share/man ]; then | |
37 [[ "$MANPATH" =~ ~/perl/share/man ]] || \ | |
38 export MANPATH=~/perl/share/man:${MANPATH:+$MANPATH} | |
39 fi | |
40 | |
41 if [ -d ~/perl/bin ]; then | |
42 [[ "$PATH" =~ ~/perl/bin ]] || \ | |
43 export PATH=~/perl/bin${PATH:+:$PATH} | |
44 fi | |
45 fi | |
46 | |
47 # Local install paths - install things to ~/Installs directories, and | |
48 # they will automatically get the proper paths added. Most things | |
49 # that use autoconf will do this with | |
50 # './configure --prefix=~/Installs' | |
24 for D in ~/Installs/* ; do | 51 for D in ~/Installs/* ; do |
25 if [ -d $D/bin ]; then | 52 if [ -d $D/bin ]; then |
26 [[ "$PATH" =~ "$D/bin" ]] || export PATH=$D/bin${PATH:+:$PATH} ; fi | 53 [[ "$PATH" =~ "$D/bin" ]] || \ |
27 if [ -d $D/share/man ]; then | 54 export PATH=$D/bin${PATH:+:$PATH} |
28 [[ "$MANPATH" =~ "$D/share/man" ]] || export MANPATH=$D/share/man:${MANPATH:+$MANPATH} ; fi | 55 fi |
29 if [ -d $D/man ]; then | 56 |
30 [[ "$MANPATH" =~ "$D/man" ]] || export MANPATH=$D/man:${MANPATH:+$MANPATH} ; fi | 57 if [ -d $D/share/man ]; then |
31 if [ -d $D/lib ]; then | 58 [[ "$MANPATH" =~ "$D/share/man" ]] || \ |
32 [[ "$LD_LIBRARY_PATH" =~ "$D/lib" ]] || export LD_LIBRARY_PATH=$D/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} ; fi | 59 export MANPATH=$D/share/man:${MANPATH:+$MANPATH} |
60 fi | |
61 | |
62 if [ -d $D/man ]; then | |
63 [[ "$MANPATH" =~ "$D/man" ]] || \ | |
64 export MANPATH=$D/man:${MANPATH:+$MANPATH} | |
65 fi | |
66 | |
67 if [ -d $D/lib ]; then | |
68 [[ "$LD_LIBRARY_PATH" =~ "$D/lib" ]] || \ | |
69 export LD_LIBRARY_PATH=$D/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} | |
70 fi | |
33 done | 71 done |
72 | |
73 # Now make sure ~/bin is top of the list | |
74 if [ -d ~/bin ]; then | |
75 [[ "$PATH" =~ ~/bin ]] || \ | |
76 export PATH=~/bin${PATH:+:$PATH} | |
77 fi |