Mercurial > index.cgi > dotfiles
view .bashrc @ 3:072b183989e0
Merged in changes for the Mac, including the beginnings of platform
deliniation (at least in the .bash_aliases).
author | huston@80426f53-59d1-405d-934b-f07cd76f4a1a |
---|---|
date | Sat, 11 Apr 2009 05:58:03 +0000 |
parents | 7e33b3191cf7 |
children | 6ffd3fb73f7f |
line wrap: on
line source
# .bashrc # This file is sourced for shells which are interactive but not a # login shell; however, since it is also sourced within # ~/.bash_profile, the end result is that this file is sourced for all # shells. # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi # User specific aliases and functions if [ -f $HOME/.bash_aliases ]; then . $HOME/.bash_aliases fi # # Environment variables # export PS1='\h:\w\$ ' export PAGER=less export EDITOR=vim # # Paths # # Standard-ish paths; some of these may be in place already, but if # they're not they should probably go near the front of the pack. for P in /sbin /usr/sbin /usr/local/bin /usr/local/sbin \ /opt/local/bin /opt/local/sbin ; do [[ "$PATH" =~ $P ]] || \ export PATH=${P}${PATH:+:$PATH} done for M in /usr/local/share/man /usr/local/man /opt/local/share/man ; do [[ "$MANPATH" =~ $M ]] || \ export MANPATH=${M}${MANPATH:+:$MANPATH} done # Local Perl install if [ -d ~/perl ]; then [[ "$PERL5LIB" =~ ~/perl ]] || \ export PERL5LIB=~/perl${PERL5LIB:+:$PERL5LIB} if [ -d ~/perl/share/man ]; then [[ "$MANPATH" =~ ~/perl/share/man ]] || \ export MANPATH=~/perl/share/man:${MANPATH:+$MANPATH} fi if [ -d ~/perl/bin ]; then [[ "$PATH" =~ ~/perl/bin ]] || \ export PATH=~/perl/bin${PATH:+:$PATH} fi fi # Local install paths - install things to ~/Installs directories, and # they will automatically get the proper paths added. Most things # that use autoconf will do this with # './configure --prefix=~/Installs' for D in ~/Installs/* ; do if [ -d $D/bin ]; then [[ "$PATH" =~ "$D/bin" ]] || \ export PATH=$D/bin${PATH:+:$PATH} fi if [ -d $D/share/man ]; then [[ "$MANPATH" =~ "$D/share/man" ]] || \ export MANPATH=$D/share/man:${MANPATH:+$MANPATH} fi if [ -d $D/man ]; then [[ "$MANPATH" =~ "$D/man" ]] || \ export MANPATH=$D/man:${MANPATH:+$MANPATH} fi if [ -d $D/lib ]; then [[ "$LD_LIBRARY_PATH" =~ "$D/lib" ]] || \ export LD_LIBRARY_PATH=$D/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} fi done # Now make sure ~/bin is top of the list if [ -d ~/bin ]; then [[ "$PATH" =~ ~/bin ]] || \ export PATH=~/bin${PATH:+:$PATH} fi